| Any Character | . | Matches any single character (except newline) |
| Repetition (0+) | a* | Matches zero or more occurrences of "a" |
| Repetition (1+) | a+ | Matches one or more occurrences of "a" |
| Optional | a? | Matches zero or one occurrence of "a" |
| Range Repetition | a{2,5} | Matches between 2 and 5 occurrences of "a" |
| Exact Repetition | a{3} | Matches exactly 3 occurrences of "a" |
| Grouping | (abc)+ | Treats "abc" as a group and repeats it |
| Alternation (OR) | a|b | Matches either "a" or "b" |
| Start Anchor | ^abc | Matches content starting with "abc" |
| End Anchor | abc$ | Matches content ending with "abc" |
| Character Class | [abc] | Matches any one of "a", "b", or "c" |
| Negated Class | [^abc] | Matches any character except "a", "b", or "c" |
| Range | [a-z] | Matches characters within a range |
| POSIX Character Class | [[:digit:]] | Matches digits (recommended for portability) |
| Combined Class | [[:alnum:]_] | Matches letters, digits, or underscore |
| Escape Character | \. | Escapes special characters (e.g., match literal ".") |
| Concatenation | abc | Matches "abc" in sequence |
| Greedy Match | a.*b | Matches as much as possible between "a" and "b" |
| Nested Pattern | (ab|cd)+ | Matches repeated sequences of "ab" or "cd" |
| Complex Example | ^[a-zA-Z0-9_]+$ | Matches strings containing only letters, digits, or underscore |
| Note | * + ? are greedy | Non-greedy quantifiers (like *?) are not supported |
| Note | No support for \d \w | Use POSIX classes instead (e.g., [[:digit:]]) |
| Note | () for grouping | Parentheses do not require escaping in ERE |