# Character Class Shorthand
\d # any numeric digit from 0 to 9
# or (0|1|2|3|4|5|6|7|8|9)
\D # any character that is NOT a numeric digit
\w # any letter, numeric digit, or the underscore character
\W # any character that is NOT a letter, numeric digit, or
# the underscore character
\s # any space, tab, or newline character
\S # any character that is not a space, tab, or newline
# Custom Character Class
[aeiouAEIOU] # vowel
[a-zA-Z0-9] # alpha-numeric
[0-5.] # match digits 0 to 5 and a period
# (no escape characters required)
# regex
\d{3} # match 3 times \d\d\d
? # match zero or one of the group preceding ?
# non greedy match (match the shortest string possible)
* # match zero or more of the preceding character
+ # match one or more of the preceding character
{} # match specific repetitions
(Ha){3,} # match 3 or more instanaces of (Ha) group
(Ha){,5} # match 0 to 5 instances
{Ha}{3,5}? # non greedy match
# Example
# Match the string 'First Name:', followed by any and all text, followed by 'Last Name:', and then followed by anything again
'First Name: (.*) Last: Name: (.*)'