A regular expression that can be used to match anything that doesn’t have a specific character, like dot(.), comma(,), dash(-), whitespace, etc.
Note that don’t forget to replace the dot(.) with another character in the following regex.
/^[^.]+$/g
Matches:
- I’m regex pattern
Non-matches:
- I’m regexpattern.com
- file.exe