sublimetext3 - Sublime Text regex to isolate an achor tag -
i'm looking sublime text regular expression enable me find , replace anchors within html file.
for example:
<a href="#menu">menu</a>) <a href="http://en.wikipedia.org/wiki/breadcrumb_(navigation)">
i've tried finds all links , anchors – want anchors:
(?i)<a([^>]+)>(.+?)</a>
i've tried selects 2 nearby tags , in between:
(<a href="#)(.*)("{1})>
here's eventual solution came with:
(<a href="#)([^"]+)("{1})>
this allows me replace anchors so:
$1" onclick="alert('yay')">
Comments
Post a Comment