Skip to content

Instantly share code, notes, and snippets.

@betweenbrain
Created October 11, 2011 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betweenbrain/1277937 to your computer and use it in GitHub Desktop.
Save betweenbrain/1277937 to your computer and use it in GitHub Desktop.
Regex to find name attribute containing any single word
name\=\"\b[a-zA-Z0-9_]*"
  • More complex usage using a tagged expression to move contents of the anchor to after it

Search with \<a name\=\"([a-zA-Z0-9_]*)"\>([a-zA-Z0-9_]*)\<\/a\> to replace with \<a name\=\"$1"\>\<\/a\>$2

@betweenbrain
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment