Sublime Forum

Clear HREF in HTML

#1

Hello, I have HTML documents with many URL and my question is whether it is possible cleaned at the same time. Some like Find and Replace.

What I have:
< a href=“http://www.google.com/”>< img src=“01.jpg” />
< a href=“http://www.pinterest.com/”>< img src=“02.jpg” />
< a href=“http://www.sublimetext.com/”>< img src=“02.jpg” />
atc…

What I need:
< a href="">< img src=“01.jpg” />
< a href="">< img src=“02.jpg” />
< a href="">< img src=“02.jpg” />
atc…

Thank you very much.

0 Likes

#2

Make sure regular expressions are enabled in your find and replace then enter in the boxes as follows:
Find What: href=".*?"
Replace With: href=""

I’ve found the following site to be a very good primer on regular expressions: https://qntm.org/files/re/re.html

2 Likes

#3

Thank you.

0 Likes