Small Utility Lab

MATCH, INSPECT, REFINE

Test a JavaScript regular expression.

Test JavaScript regular expressions against sample text. Inspect matches, capture groups, named groups, and offsets in your browser.

Enter the pattern without surrounding slashes; example: \d+. Pattern limit: 500 characters.

JavaScript flags: d, g, i, m, s, u, v, y. Global or sticky mode returns multiple matches.

Input limit: 50,000 characters. Matching runs in a worker with a 300 ms timeout.

Edit the pattern, flags, or text, then test. Your input stays in this browser.

How results work

Enter a JavaScript regular expression pattern without slash delimiters, then add any supported flags. The tester uses the browser's RegExp implementation, so supported syntax follows that browser. Results show the complete match, capture values, named captures, and start/end offsets. Offsets are JavaScript string indices (UTF-16 code units). Add g for successive matches; without g or y, only the first match is returned. Invalid patterns and flags show the browser's syntax error.

Patterns run in a separate worker. Each run stops after 300 ms, patterns are limited to 500 characters, test text to 50,000 characters, and output to 100 matches. These limits reduce the chance of a slow expression blocking the page; they do not make every pattern efficient. Page content updated November 3, 2026.

Runs in your browser. No uploads. No account.

Good to know

Why do I see only one result?

JavaScript regular expressions return one match by default. Add the g flag to find successive matches, or y to require each match at the current position.

Where are capture groups shown?

Each result lists numbered capture values and named groups, along with the full matched text and its start/end string offsets.

Does this support regex syntax from other languages?

No. It uses the JavaScript RegExp implementation in your browser; syntax and available flags can vary by browser version.

Can a pattern run forever?

A worker is terminated after 300 ms and the tester limits pattern, input, and result sizes. Complex patterns can still time out.

Does my test text leave the browser?

No. Matching runs locally in a browser worker. The tool does not upload or save the pattern or text.

Is it free?

Yes, during beta. Optional usage-credit plans are coming soon. Payments are not available and no credits are required.

Source

Method checked November 3, 2026. MDN documents JavaScript regular-expression syntax, flags, match results, and capture groups.

How it works

1. Enter a JavaScript regex pattern and optional flags. 2. Paste test text. 3. Review full matches, capture groups, and offsets; execution has a 300 ms timeout.

Good to know

Which regular expression syntax does it use?

It uses the browser JavaScript RegExp implementation, so syntax and supported flags depend on that browser.

How can I see multiple matches?

Add the global g flag for successive matches, or the sticky y flag to match at the current position.

What appears in each result?

Results include the full match, numbered captures, named groups, and start/end offsets in JavaScript string indices.

Does my test text leave the browser?

No. Matching runs in a local browser worker and the tool does not upload or save your pattern or text.

Is it free?

Yes, during beta. Optional usage-credit plans are coming soon. Payments are not available and no credits are required.