How to use the regex tester
Test regular expressions against text using your browser’s JavaScript RegExp engine. Enter the pattern without enclosing slash delimiters, supply flags separately, and paste the string you want to inspect. The result lists matched text, starting offsets, numbered capture groups, and named capture groups as downloadable JSON. A successful test with no matches returns an empty array.
The g flag finds successive matches instead of stopping at the first result. Use i for case-insensitive matching, m to change line anchor behavior, and s when a dot should include line terminators. Unicode behavior depends on the u or v flag and your browser’s support. Invalid flags, incompatible flag combinations, and malformed patterns produce a clear error from the engine.
Testing runs in a dedicated worker with a two-second timeout, so a pattern with excessive backtracking can be interrupted without blocking the page indefinitely. Input is limited to 200,000 UTF-8 bytes, patterns to 2,000 characters, and output to 1,000 matches. Empty matches advance through the string rather than looping forever. These limits help keep interactive testing manageable.
Frequently asked questions
Which regex flavor is supported?
This tester uses JavaScript regular expressions supported by your current browser. PCRE, Python, Java, and .NET have differences in syntax and matching behavior. Verify your final expression in the actual runtime where it will execute.
What do match indices mean?
Indices are zero-based UTF-16 code-unit offsets, matching JavaScript string indexing. Some characters, including many emoji, occupy two code units. Capture groups that did not participate are represented as null in the JSON array output.
Is my test text uploaded?
No. The pattern and test text are passed to a local browser worker, not an external service. Results stay on this page until you copy, download, change the inputs, or clear them. The tool does not store your text between visits.