- RegEx 101 - Handles PCRE (PHP), JavaScript, and Python
- RegExr - Lets you test replacing using capture groups. Cannot handle lookbehinds b/c JavaScript only
- regex one - Has lessons
| Metachar | Meaning |
|---|---|
| \n | newline |
| \w | word char [a-zA-Z0-9_] |
| \W | not word char |
| \d | digit |
| \s | space |
| ^ | start of string |
| $ | end of string |
| . | any char except newline |
* |
0 or more of prev expression |
+ |
1 or more of prev expression |
| ? | make prev expression optional |
| ` | ` |
| {...} | explicit quantifier {2}, {2,5} |
| [...] | explicit set of chars |
| [^...] | exclude explicit set of chars |
| (...) | capturing group |
(?:...) |
don't create capturing group |
| (?=) | positive lookahead |
| (?!) | negative lookahead |
| (?<=) | positive lookbehind |
| (?<!) | negative lookbehind |