Skip to content
Flavor
ECMAScript
Deadline
500 ms
Runtime
Browser

Inspect numbered and named regular-expression captures

See the full first match beside every numbered and named capture, including groups that did not participate.

Local processingNo sign-upKillable worker

Input

Use (...) for numbered groups and (?<name>...) for named groups.

Local

Flags apply to the first RegExp execution; g does not turn this route into an extractor.

Capture group report

Submit the example or replace it with your own values. User matching runs only in a disposable browser worker.

What this tool proves

Explicit ECMAScript behavior

A successful match can still contain unmatched optional groups. The report serializes those values as null rather than confusing them with an empty string captured by a participating group.

Unmatched captures remain distinct from empty captures

A successful match can still contain unmatched optional groups. The report serializes those values as null rather than confusing them with an empty string captured by a participating group.

Numbered captures preserve source order and named captures preserve their group names. The enclosing match index and end index use JavaScript's UTF-16 indexing contract, making the report suitable for debugging browser code.

Bounded execution protects the page without hiding risk

Any operation that runs a user pattern is isolated in a disposable Web Worker. Tool Swim terminates that worker after 500 ms, caps patterns at 4 KiB and text at 256 KiB, and never runs user matching on the interface thread.

Pattern, flags, text, replacement, matches, and explanations stay in the current browser tab. The public tool makes no developer API request, stores no preset, and works without an account or telemetry.

Primary references

Questions and answers

Related Regex tools