How to use the regex tester
- Type your pattern between the slashes and set flags, such as g or i.
- Paste the text to test.
- Check the highlighted matches and groups, and try a replacement.
Quick reference
\ddigit,\wletter, digit or underscore,\swhitespace,.any character+one or more,*zero or more,?optional,{2,5}2 to 5 times^start,$end,\bword boundary(…)capture group,(?:…)non-capturing,(?<name>…)named group
Patterns run in a separate worker and are stopped after 2 seconds, so a pattern that backtracks catastrophically can’t freeze the page.
Examples
1 match: 555-1234
“ana at example”