Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created July 2, 2020 01:11
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 miguelmota/3720d01f82e6e9eed74bd594ec792203 to your computer and use it in GitHub Desktop.
Save miguelmota/3720d01f82e6e9eed74bd594ec792203 to your computer and use it in GitHub Desktop.
Node.js regex for matching all except a node_module
// returns true if the value doesn't match "/node_modules/mymodule"
/^(?!\/node_modules\/mymodule)/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment