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

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

android - Linear layout children not scrolling -