You can use a regex expression in Bubble to extract specific data directly from a text string using the
:extract with regex operator and is likely the way you will use it most often. However, it can also be quite handy to use within the
:find and replace functionality to identify the text you want to replace rather than typing in a static value.
The expressions below should work in both environment.
You may have a text string such at "Juan, Lola, Henry, Felipe, Tonya". Using this regex on this text will convert it into a list of texts which you can then sort, filter, etc in your Bubble app.
Sample URL: https://url.com/path1/path2/path3?param1=value1¶m2=value2
Replace the placeholder text in the expression with the name of the parameter containing the value you need to retrieve. For example this expression
(?<=param1=)[^\&]+ will return 'value1' from the sample URL.
Demo String: myAwesomeImage.jpeg, favoriteVideo.mp4
Use this expression to extract the extension type from one file or a list of files. Running this expression on the above list of filenames would result in the following list of texts "jpeg, mp4"