| Meta character | Meaning | |
|
| {n} | Exactly n times | |
| {n,} | At least n times | |
| {n,m} | At least n but not more than m times | |
| (?=expression) | Positive lookahead | |
| (?!expression) | Negative lookahead | |
| (?<=expression) | Positive lookbehind | |
| (?<!expression) | Negative lookbehind | |
| \1 \2 ... | Backreference | |
| *? +? ?? {n,m}? | Reluctant quantifiers | |
| (?\tag-number) | Match target | |
| \s | Same as[ \t\r\n] | |
| \S | Same as[^ \t\r\n] | |
| \d | Same as [0-9] | |
| \D | Same as [^0-9] | |
| \c | Same as [a-zA-Z0-9_] | |
| \C | Same as [^a-zA-Z0-9_] | |
| \i | Same as [a-zA-Z_] | |
| \I | Same as [^a-zA-Z_] | |
| \y | Word boundaries with number | |
| \Y | Negated version of \y | |
| \Q to \E | Between the \Q and the \E are interpreted as literal characters | |
| (?:expression) | Non-capturing groups | |
| (?#expression) | Comment | |