Regex Tester

Test JavaScript regular expressions with flags, match offsets, capture groups and cancellation.

Local processing · No uploads · No input history

JavaScript engine. Common flags: g global, i case insensitive, m multiline, s dotAll, u Unicode, y sticky and d indices. Unsupported or duplicate flags produce an error.

Matches and capture groups

Ready. Enable JavaScript to use the controls. Inputs stay local.

How it works

Enter the pattern without enclosing slash delimiters. Enter flags such as g, i or m, then paste the test text. Click Test regex; use Cancel if you want to stop early. Read match offsets, captured groups and named groups in the results. Adjust the pattern and run again. Example demonstrates named word captures. The browser JavaScript regex engine is used, not PCRE or Python. Offsets count UTF-16 code units. Without g, only the first match is shown; zero-length global matches advance correctly in Unicode mode. Patterns are limited to 2,000 characters and input to 100,000. Each worker has a one-second deadline and is terminated on completion, cancellation, input edits or page hiding. Results stop at 1,000 matches; displayed match text is capped at 500 characters and groups at 20.

Interpret results and limitations

The browser JavaScript regex engine is used, not PCRE or Python. Offsets count UTF-16 code units. Without g, only the first match is shown; zero-length global matches advance correctly in Unicode mode. Patterns are limited to 2,000 characters and input to 100,000. Each worker has a one-second deadline and is terminated on completion, cancellation, input edits or page hiding. Results stop at 1,000 matches; displayed match text is capped at 500 characters and groups at 20.

Example

Use this example to understand the expected behavior before working with your own input.

Pattern: (?<word>[A-Za-z]+)
Flags: g
Text: Hello AnyUtils 123

Continue your task

Text Diff — Continue with this related local tool.

json formatter — Continue with this related local tool.

Frequently asked questions

The regex exceeds the time limit?

Remove ambiguous nested repetition, simplify the pattern or reduce input. Cancellation terminates the worker; it does not leave matching running in the main page.

Is my input uploaded or stored?

No. Processing and results stay in this tab. There is no input history or server processing. Copy and download are explicit actions.

Usage analytics settings

Optional analytics helps us improve tools. Tool input, recordings and search text are excluded from our events. Privacy policy

Usage analytics is off unless you enable it.