Skip to content

Instantly share code, notes, and snippets.

@zheeeng
Created July 12, 2019 01:00
Show Gist options
  • Save zheeeng/7389f5386f6f1c9b209a06b911a090fc to your computer and use it in GitHub Desktop.
Save zheeeng/7389f5386f6f1c9b209a06b911a090fc to your computer and use it in GitHub Desktop.
Regexp for non-matching
/^(?!.*hello).*$/.test('hello')
/^((?!hello).)*$/.test('hello')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment