| chars | action | Perl | grep | egrep | lex |
| abc... | Match that character (metacharacters excluded) | Perl | grep | egrep | lex |
| \\\.\*... | Match that metacharacter following the back slash | Perl | uses sh | uses sh | lex |
| "" | De-meta any chars inside quotes | | | | lex |
| \t,\n,\r,\f | tab, newline, return, form feed | Perl | grep | egrep | lex |
| . | Match any character | Perl | grep | egrep | lex (not \n) |
| [] | Character class | Perl | grep | egrep | lex |
| [^] | Inverse Character class | Perl | grep | egrep | lex |
| [-] | Character ranges | Perl | grep | egrep | lex |
| \w | Match a "word" character (alphanumeric plus "_") | Perl | | | |
| \W | Match a non-word character | Perl | | | |
| \s | Match a whitespace character | Perl | | | |
| \S | Match a non-whitespace character | Perl | | | |
| \d | Match a digit character | Perl | | | |
| \D | Match a non-digit character | Perl | | | |
| anchors | action | Perl | grep | egrep | lex |
| ^ | Match the beginning of the line | Perl | grep | egrep | lex |
| $ | Match the end of the line | Perl | grep | egrep | lex |
| \b | Match a word boundary | Perl | | | |
| \B | Match a non-(word boundary) | Perl | | | |
| operators | action | Perl | grep | egrep | lex |
| | | Alternation | Perl | | egrep | lex |
| () | Grouping | Perl | | egrep | lex |
| multiplicity | action | Perl | grep | egrep | lex |
| * | Greedy match 0 or more times | Perl | grep | egrep | lex |
| + | Greedy match 1 or more times | Perl | | egrep | lex |
| ? | Greedy match 1 or 0 times | Perl | grep | egrep | lex |
| {n} | Greedy match exactly n times | Perl | | egrep | |
| {n,} | Greedy match at least n times | Perl | | egrep | |
| {n,m} | Greedy match at least n but not more than m times | Perl | | egrep | lex |
| lookAhead | action | Perl | grep | egrep | lex |
| / | Look ahead predicate | | | | lex |
| (?= ) | Look ahead predicate | Perl | | | |
| (?! ) | NOT Look ahead predicate | Perl | | | |