Is Extract with Regex still working?


I have a testbed consisting of a text input and two text holders.

Text output A simply takes the value of text input. It works fine.

Text output B takes the value of the text input
extract with regex [ /\w+\s?/g] to eliminate extra spaces {tested fine in}
join with “”.

from which I get nothing, nada, niente.

shouldn’t I get something? even if I just use pattern /\w/g i get nothing.


If I am understanding you correctly, I see two issues.

  1. You don’t need (or want) the brackets [] or the Open / or Close/ operators - they are inferred in Bubble.

  2. You are trying to use extract with regex to get yourself a list of character groups that AREN’T a group of repeating spaces and then put them back together. The easier solution is to use value:find & replace and check the ‘Use a regex pattern’ checkbox. In the regex pattern input just put \s+ . In the Replace With input just type a space. This just returns your original value with all instances of ANY number of spaces with a single space.


1 Like

That works perfectly, thanks a lot Marc

However that was just an experimental trial and I think I have found a bug.

If you apply find and replace to text from an input field the Regex works on display of the data in a text field that works.

If you apply find and replace to a text field resulting from an API query and don’t use regex the transformation works perfectly.

BUT if you apply find and replace to a text field resulting from an API query but do select USE regex pattern (as above) it returns an empty field. In fact no find and replace with any Regex pattern seems to work.


Regex Does work - but not completely.
/s+ Doesn’t work
[ ]+ Does work
/w Doesn’t work

Just to be clear, /s+ and /w aren’t valid expressions. Are those what you actually typed? Or did you mean \s+ and \w ?

This topic was automatically closed after 14 days. New replies are no longer allowed.