Regex Tester
Test a JavaScript regular expression against sample text and see matches, positions, and capture groups — with a safety timeout against runaway patterns.
Uses your browser's native RegExp engine directly — nothing is evaluated as code, and your pattern and text are never sent to a server. Matching runs in a background worker with a 2-second safety limit, so an accidentally slow pattern can't freeze the page.
Enter a JavaScript regular expression pattern, optional flags (e.g. g, i, m), and some text to test it against. Matches, their positions, and any capture groups are listed below. Flags are honored exactly as real JavaScript would: without the g flag you'll see only the first match, matching how a non-global pattern actually behaves in code — add g to find every occurrence.
Some patterns can take an extremely long time to evaluate against certain text (known as "catastrophic backtracking"). This tool runs matching in a background worker with a 2-second limit, so a pathological pattern can't freeze the page — it will simply report that the pattern took too long.