Regex To Match A String That Doesn’t Contain A Specfic Character

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.



  • I’m regex pattern


  • I’m
  • file.exe

See Also: