| Pattern | Result |
| . | Matches any character except newline |
| [a-z0-9] | Matches any lower-case single character of set |
| [^a-z0-9] | Matches anything other than lower-case single characters |
| \d | digit [0-9] |
| \D | non-digit [^0-9] |
| \w | alphanumericunderscore [a-zA-Z0-9_] |
| \W | non-alphanumericunderscore |
| \s | whitespace (including punctuations) |
| \S | non-whitespace |
| \n | end-of-line |
| \r | carriage-return |
| \t | tab |
| \b | text-boundaries |
| \0 | Matches a null character |
| \nnn | Matches a character corresponding the ASCII code (numeric) |
| \xnn | Matches a character corresponding the ASCII code (octal) |
| (abc) | back-reference |
| \1 | the first match |
| \2 | the second match |
| x? | 0 or 1 |
| x* | 0 or more |
| x+ | 1 or more |
| x{m,n} | at least m not more than n |
| fee&bar;fie&bar;foe | Matches one of fee, fie, or foe |
| ^ | Anchors match to the beginning of a line or string |
| $ | Anchors match to the end of a line or string |