Skip to content

Instantly share code, notes, and snippets.

@bameyrick
Created January 3, 2019 11:05
Show Gist options
  • Select an option

  • Save bameyrick/5f6ea3dead1328d31ff502d02bf19d86 to your computer and use it in GitHub Desktop.

Select an option

Save bameyrick/5f6ea3dead1328d31ff502d02bf19d86 to your computer and use it in GitHub Desktop.
Regex to replace something that is not wrapped / between HTML tags
/(?!<div[^>]*?>)(Test)(?![^<]*?<\/div>)/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment