Help with Regex

Hi there,

I wanted to get some help with Regex. I am building a workflow to extract from a link the two components, the url and the description.

Example: I have this in a field
<a href= target=_blank>This is bubble</a>

I want to extract:

  •’ and copy to one field and
  • “This is bubble” and copy to another field

I know how to build the workflow, I am just not sure of the regex that I would use. Any help would be appreciated



1 Like

I have the regex for both parts

which seems to be working in

But when I use these expressions in bubble, I am not getting the result that I am expecting

Any thoughts on what is going wrong here?
Thanks in advance

Use this as the reg ex expression, where “This is” and “sentence” are the two components surrounding the string to extract.

(?<=This is)(.*)(?=sentence)

I find this link really helpful for this kind of regex.

In your example, I’d use:
(?<=href=)(.*)(?= target)
(?<=blank>)(.*)(?= </a>)

You may need to escape the = after href and the > after blank by adding a \ in front of it. This should get you close. Also, if that doesn’t work, you can extract some of the text with this and then find & replace.

1 Like

Thanks @david17 I was looking for something like this and this post helped.

@frankstillone I had to add escape chars like this to get what you wanted. If you haven’t figured that out already. fyi.


1 Like

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