Regex, every non-alphanumeric character except white space or colon

[^a-zA-Z\d\s:]
  • \d – numeric class
  • \s – whitespace
  • a-zA-Z – matches all the letters
  • ^ – negates them all – so you get – non numeric chars, non spaces and non colons

Leave a Comment