REPLACE function syntax from html data

Quite simple question but I have no clue what would be the right syntax inside the REPLACE Function >>>> Replace ( ; ; )

Basically any time there is an html link with this structure:

  1. I want the REPLACE function to delete it all.
  2. Link and anchor text in the actual example has to be a catch-all type of logic
  3. “(” and “)” are the important characters in the search query.

Anyone can help with this REPLACE function syntax?

Welcome to the Make community!

You can use this regular expression pattern

/\(<a href="[\w\W]+?">[\w\W]+?<\/a>\)/g

Screenshot_2023-12-16_151220

Regex test:

Screenshot_2023-12-16_151248

2 Likes

Hey Sam,

thanks so much for your help. I gave it a shot but I probably missing something here.

Here is your string:

I unfortunately ending up with the same result. Here is some real code end result example:

<p>Think of a flywheel for your hot water system. It quietly solves problems that homeowners may not be aware of (<a href="https://bluefrag.us/what-you-need-to-know/">bluefrag</a>). While homeowners often focus on the basic functions (<a href="https://bluefrag.us/ever-heard-of-what-you-need-to-know/">bluefrag</a>).</p>

Any idea what I miss here?

Sorry for the delay, I was out travelling over the weekend :slight_smile:

Either way works for me

first

Screenshot_2023-12-18_201221 (2)

second

Screenshot_2023-12-18_211212


Check that you don’t have spaces around the variables.

2 Likes

It worked. a million thanks!

No problem, glad I could help!

In future, please create a new thread for each question. This makes it easier for others with the same problem to search for the answer. Thank you for your cooperation!

The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049