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

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -