Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Last active December 14, 2018 22:59
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 tomhodgins/141d587d9372761300bd5b4543805cd5 to your computer and use it in GitHub Desktop.
Save tomhodgins/141d587d9372761300bd5b4543805cd5 to your computer and use it in GitHub Desktop.
new RegExp(
[
'\\\\', // a backslash
'(?!', // not followed by:
'[0-9a-fA-F]{1,6}', // - 1-6 hex characters,
'|\\n', // - or a newline
'|$', // - or the EOF
')'
].join(''),
'g'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment