Developer utility · JavaScript RegExp
Regex Tester
Test JavaScript regular expressions locally in a dedicated worker. This tool bounds elapsed work and reports timeouts; it does not make every regular expression safe.
Matches
Run a pattern to see bounded match details.
How to use Regex Tester
This tool uses the browser’s ECMAScript regular expression dialect. Without g, it reports the first match; with g, it reports ordered non-overlapping matches. Captures include numbered and named groups. Character classes, quantifiers, anchors, alternation, lookaheads, and lookbehinds follow the browser’s JavaScript implementation.
Each request runs in a fresh Web Worker and is terminated after 250 ms. Pattern, test text, replacement, match count, captured values, extracted text, and serialized output are bounded. Worker termination protects the main interface and limits elapsed time, but it is not a hard CPU or memory quota; catastrophic-backtracking expressions can still consume resources before termination.
Replacement uses native JavaScript string-replacement tokens only. Extracted matches can be copied or downloaded as bounded plain text. A full regex debugger, token rail, PCRE/Python dialects, code generation, persistence, and shareable links are not provided.
Processing is designed to stay local; do not paste secrets, and note that runtime privacy verification remains a release gate. Related tools: JSON Formatter & Validator, Base64 Encoder & Decoder, and URL Encoder & Decoder.
Frequently asked questions
Which regex dialect is supported?
The worker uses the browser’s ECMAScript RegExp implementation with the displayed flags. It is not a PCRE or RE2 compatibility tester.
Does a timeout prove a pattern is safe?
No. The 250 ms watchdog and worker termination protect the interface and bound elapsed waiting, but they are not hard CPU or memory quotas. Treat timeout behavior as a safeguard, not proof of safety.
How do replacement tokens work?
Use $& for the full match, numbered or named capture tokens for groups, and $$ for a literal dollar sign. Replacement text is never evaluated as JavaScript.