Tools / Regex tester
Regex tester
Test a regular expression
Live-highlighted matches and a capture-group table, with a timeout guard against catastrophic patterns.
Runs entirely in your browser, in a Web Worker with a 1-second timeout - nothing you type is ever sent anywhere, and a runaway pattern can't freeze the page.
Highlighted text
Capture groups
Quick reference
. | Any character except newline |
\d | A digit (0-9) |
\w | A word character (letter, digit, underscore) |
\s | A whitespace character |
^ | Start of string (or line, with the m flag) |
$ | End of string (or line, with the m flag) |
* | 0 or more of the previous token |
+ | 1 or more of the previous token |
? | 0 or 1 of the previous token |
{n,m} | Between n and m of the previous token |
(...) | Capture group |
(?:...) | Non-capturing group |
(?<name>...) | Named capture group |
[abc] | Any one of a, b, or c |
[^abc] | Any character except a, b, or c |
| | Alternation (OR) |