Regex Tester
Test a JavaScript pattern against sample text. View matched text and capture groups.
How to use it
- Paste your input, or load the example.
- Choose the options that match your task.
- Select Test regex, then review the result.
- Copy the result or download regex-tester.json.
JavaScript regex behavior
Flags d, g, i, m, s, u, v and y are accepted when supported by your browser. Without g or y, only the first match is returned. Match indexes count UTF-16 code units, not visible characters. Unmatched capture groups are null. Results stop at 1,000 matches. Processing runs in a separate worker and is stopped after two seconds to keep pathological patterns from freezing the page.