did anyone use regex in the find and replace function (or somewhere else if thats possible)?
I want to use regex on a Input where the user enters a URL and I extract a specific part of the URL (which is always somewhere else in the URL)
I am reffering to this post by emmanuel:
So I have this regex /([a-zA-Z0-9]{10})(?:[/?]|$) which works great in Excel/Google sheets. But I dont know where I should put it so that the input will be “converted”?
Thanks. My problem is that I dont even know where the regex could be placed? I did not find anything about that in the documentation. Do I have to put it in “Find & Replace” or somewhere else? And if so, how do I put it, do I have to write something like “regextract” etc.
So, I made some examples in the forumapp, Emmanuel. Would be great if you or somebody else could help! At the moment I am using blockspring and google sheets for this. But I think it is not necessary and only slows down the app because I have to send data to blockspring.
Forumapp:
Yes, you put in in Find and replace, and there you type what you’re trying to find. Don’t think in regex terms, just type what you’re looking first. Don’t do REGEX = XXX (The point of bubble is that you don’t have to do this :))
So, I just put in the expression which should be extracted from the string in the part "FInd (text or regex)
And what happens is (of course) it would replace the part I defined with whatever I type into “Replace by”.
But…what I need is exactly the other way around…replace everything but the ASIN and keep it…(which works this way when I use this regex in excel or google sheets. But of course there is not “replace by” function attached to it.
I created an example to extract the ID. Yes you can use REGEX but need a base in JavaScript, and using the HTML icon, and pass variables, or use the other option you mentioned.
thank you for your help and all the time you invested just to help me!
I played with the demo and the app a bit. My only problem now would be: How do I get the extracted ID (B00RQA6E20) “out” of the HTML? SO I can use it in a workflow?
If i’m correct, send data to API Connector. I used API Connector to received info from outside world, and working fine (using the software PostMan before to validated the API Connector response). Writing code in JavaScript to communicate with Bubble API Connector is the challenge. Send me the code when done
I had the same issue as @Pat: trying to extract the product id from an Amazon link. This was one of the few threads I came across while searching for help, so I’m putting my solution here for the next person.
Start with a text input where the user pastes an Amazon link.
Add a submit button that triggers the following workflow:
Step 1
Create a new thing …
item id = Input amazon link’s value: extract with Regex. Regex pattern = dp/.{10}
Step 2
Make changes to a thing …
item id = Result of Step 1’s item id: extract with Regex. Regex pattern = .{10}$
I get weekdays from API response in text format.
Basically that text has seven characters, for Mon-sun.
when char is “1” that means Mon flag is true. And when it is “0” then I have to show nothing. forex. if text is 1010101 that means i want to show " Mon,Wed, Fri, Sun " in the text field.
How i can read each character from text and then apply condition on that to check whether it is 1 or 0?