Extract any character except newline:
Either of the characters "a" and "b":
Any character between "a" and "e", including "a" and "e":
Any character except "a" and "1":
Any digit repeated one or more times:
The character "a" repeated 2 or 3 times:
Any digit:
Nondigit characters:
Space, newline, tab, or other whitespace character:
Non-whitespace characters:
Word characters:
Nonword characters:
Find all uppercase letters:
Split a string at the beginning of a new line:
Split a string at the end of a new line:
Insert a character at the boundary of each word:
Split a string at every character except at the boundary of a word:
Conditional patterns:
Use alternatives to match one or more line breaks:
Non-greedy matches are done by appending a question mark "?" to the quantifiers: