I want to use YouTube player w/YouTube URLs so trying to use Regex to extract the video id.
I found a Regex pattern that works (it extracts the 11 char video ID from a URL; tested w/a regex pattern tester).
My prob is that when I use …'s value: extract with Regex I get an empty result.
As shown in screenshots, I created a new field (video_userid_test) to test the Regex func’y but when running through the debugger the field always ends up ‘empty.’
I’ve tried :first item, :last item (and no item!)
I’ve tried bracketing pattern with single quotes and slashes.
I’m confident the core of the pattern works but can’t seem to get the regex ‘result’ (ie the video id) into that field. Once there, I’ll then use the video id field in the Youtube player.
(tested it here: https://www.phpliveregex.com/)
video_userid_test is a ‘text’ field; for now it’s just a temporary dupe of video_id that I use for the actual video player. Just want to get it to work (ie get it to be just the video id) and then will use same logic in that field and remove the video_userid_test field.
I thought it used to work by retrieving capture groups as list items, no? @NigelG’s comment implies that regex is broken as well. This is rather disconcerting. It’d be good to know that a bug has been officially filed so that it’s on their radar.
Did report it as bug though the the person I was connecting with in Bubble support said she didn’t think there was a regex bug (“hasn’t been touched in while”). Just trying this :extract w/Regex for first time so not an expert though it seems like get the ‘result’ from a regex pattern should be one this func’y does - but what do I know!
She thought this might be a new feature that’s required. Hopefully I’ll hear back soon.
Thanks. I could be mis-remembering how it worked, but I also know that there seems to have been a number of platform issues reported as of late, including regressions like this one where UI fields inexplicably disappeared from the Image element.
What I learned is that Bubble returns all matches as a list, whereas I thought it returned all capture groups within a match as a list. And perhaps it did work that way at one time - not sure. I certainly have no reason to doubt @NigelG that something has changed in that regard.