A |
The character “A” |
ABC |
The characters “ABC” |
[ABC] |
One character, either “A”, “B” or “C” |
[A-C] |
One character between “A” and “C” |
[^ABC] |
An arbitrary character that is neither “A”, “B” or “C” |
. |
An arbitrary character |
A+ |
At least one “A” character |
A* |
At least zero “A” characters |
A? |
Zero or one “A” character |
^A |
A string that begins with “A” |
A$ |
A string that ends with “A” |
ABC|DEF|GHI |
“ABC”, “DEF” or “GHI” |
A{2} |
Two “A” characters (AA) |
A\{2,} |
Two or more “A” characters (AA, AAA, AAAA…) |
A\{2,3} |
Two to three “A” characters (AA, AAA) |
¥b |
Word breaks, such as spaces |
¥B |
Any character besides ¥b |
¥d |
An arbitrary number (same as [0-9]) |
¥D |
Any character besides numbers (same as [^0-9]) |
¥s |
Single breaking character |
¥S |
Any single character besides ¥s |
¥w |
Alphanumeric characters including underlines (same as [A-Za-z0-9_]) |
¥W |
Any character besides ¥w |