I am trying to remove list numbering from some dynamic content using regex. The dynamic content is from an API response body, and the list numbering is not always there, but when it is present, it is always at the beginning of a paragraph.
Here is my pattern: (?:[[1-9]. |)(.+)
When applied to bubble’s regex filter it does not seem to do anything, does bubble support non-capturing groups, or am I doing something else wrong?
It’s easier if you provide an example of the input, the desired output and the actual output you get right now, otherwise we can just guess.
In the manual it says Bubble does not expose capture groups (yet).
Definitely not an expert, but is it possible to use something like this:
Find & Replace in combination with pattern [/!-@#$%^&*][0-9]
The output is literally just text paragraphs that are separated by two carriage returns, I am splitting then in workflow, filter set to two carriage returns (Press enter twice), so each line/paragraph is in it’s own repeating group text element, and looks like a numbered sentence: eg:
- This is an example of the content I am trying to use regex on.
The text is dynamic by nature, so the only way to filter is by stripping the "1. " out of the text, there is no way to strip the text out of the "1. "
Hope that helps.
Edit: got it working now, thanks for your help guys, this is my first bubble build so still figuring things out: Ticking the “use a regex pattern” box helped…
Ok, if you have a text that may begin with
1. or something similar, and you need to get rid of that you can use find and replace like Gerbert suggested.
I think you can go with an easier regular expression:
Leave empty the replace section.
I am assuming that you always have a space after the number. If that is not always true you can use
^\d+\. and then use the trim operator (any white space before or after the text will be removed)
This topic was automatically closed after 70 days. New replies are no longer allowed.