Regular Expression - \. - matching special characters

There are special (non printable) characters and Regular Expression metacharacters that need to use a slash to be matched. Additionally, there are character classes and groups that are a shorthand way of expressing commonly used groups of characters.
Non Printable CharactersMatches With...
\nNew Line Character
\tTab Character
\fForm Feed Character
\rCarriage Return Character
\vVertical Tab Character
Character GroupsMatches With...
\dAny digit [0-9]
\DAny character other than a digit
\wAny letter (A-Z,a-z), digit [0-9] or underscore (_)
\WAny character that is not a letter, digit or underscore
\sAny white space character [ \t\r\n\v\f]
\SAny character that is not a white space character
\bA word boundary (matches just before first character of a word and just after last character of a word)
\BAny character that is not a word boundary
Matching Characters that are SpecialMatches With...
\.A full stop (.)
\*An asterisk (*)
\?A question mark (?)
\+A plus sign (+)
\\A back slash (\)

Computing Articles