A regular expression which can match anything except one or more words in a string. It is a handy one if you want to skip some words in your index file.
/^(?!regex$|pattern$).*/
Matches:
- I like regex pattern.
- I Like pattern regex.
- I Like regexpattern.
Non-matches:
- regex
- pattern
See Also:
- Regex To Match One Of Two Or More Words In A String
- Regex To Match A String Containing Two Words
- Regular Expression To Match Duplicate Words