Skip to content
Flavor
ECMAScript
Deadline
500 ms
Runtime
Browser

Test one ECMAScript regular expression against text

Answer whether a pattern matches and inspect the first match, offset, captures, and named groups.

Local processingNo sign-upKillable worker

Input

Enter a pattern without / delimiters, optional flags, and the text to test.

Local

Use ECMAScript flags such as g, i, m, s, u, v, y, or d.

First-match 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 test result is more useful when it keeps the pattern, flags, match boundary, numbered captures, and named captures together. This route performs one RegExp execution and reports those facts without implying that later matches do not exist.

A first-match diagnostic is not an all-match extractor

A test result is more useful when it keeps the pattern, flags, match boundary, numbered captures, and named captures together. This route performs one RegExp execution and reports those facts without implying that later matches do not exist.

The result distinguishes no match from an empty match and reports UTF-16 string indexes, which are the indexes JavaScript RegExp returns. Use the extractor when the job is to enumerate repeated matches.

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