Skip to content

Instantly share code, notes, and snippets.

@m4ttbrock
Created June 24, 2016 20:09
Show Gist options
  • Save m4ttbrock/1b7cd3c457d0fe78131c06d2e508daa6 to your computer and use it in GitHub Desktop.
Save m4ttbrock/1b7cd3c457d0fe78131c06d2e508daa6 to your computer and use it in GitHub Desktop.
Select all anchor tags without target attribute
<a(?=\s|>)(?!(?:[^>=]|=(['"])(?:(?!\1).)*\1)*?\starget=['"])[^>]*>(.|\n|\r)*?<\/a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment