What is the difference between the regular expressions [^\d\s] and [\D\S]
will match a single character that is NOT a digit or whitespace. will match a single character that IS a non-digit or non-whitespace. Since every character is either not a digit or not whitespace, the second regex will match any character. It’s equivalent to the difference between: and Note that the following would be equivalent … Read more