Removing link..

General discussions about Advanced Find and Replace
Post Reply
Posts: 1
Joined: Thu Feb 15, 2018 4:54 pm

Removing link..

Post by norfeem » Thu Feb 15, 2018 5:39 pm

I currently have a Simple Find reg expr that is working perfectly
<a href="*>?</a>
I want to replace above leaving only the ? values example when I search
My Results are

<a href="">123</a>
<a href="" target="_blank">789</a>
<a href="">456</a>

I want to replacement to be


Is the replacement as simple as

Site Admin
Posts: 1206
Joined: Mon Jan 31, 2005 5:32 pm

Re: Removing link..

Post by Abacre » Thu Feb 15, 2018 6:57 pm

You should use regular expressions here.
Go to Batch Replace tab.
Check Use Regular expressions.
You should use:
Search for:
<a href="https://www\.yyyy\.com".*>(\d+)</a>

Replace with:

\d - any digit
\d+ - one or more digits
.* - any text (even empty).
() is used to capture the number.
$1 in replace part is used to put the captured number.

\. is used to escape . because dot is reserved char.
Kind regards,
Abacre Limited

Post Reply