Basic character classes
\d
for digits\s
for whitespace (spaces, newlines, tabs, etc.)- Making these character classes upper-case negates them. For example,
\d
is all digits. But\D
is any character that isn’t a digit.
Search
\d
for digits\s
for whitespace (spaces, newlines, tabs, etc.)\d
is all digits. But \D
is any character that isn’t a digit.