Sublime Text regex to isolate an achor tag

I’m looking for a Sublime Text regular expression that will enable me to find and replace all anchors within an HTML file.

For example:

<a href="#Menu">menu</a>) the <a href="">

I’ve tried this but it finds all links and anchors – I just want anchors:


I’ve also tried this but it selects two nearby a tags and everything in between:

(<a href="#)(.*)("{1})>

Source: regex

Leave a Reply