Regex Tester
Test regex matches, groups, and replacements with g, i, m, s, or u flags. A 300 ms worker timeout protects pages; patterns run in a disposable local worker.
Processed on your device. Tool inputs are not uploaded or saved by QUICKKIT.
Regex Tester: flags, limits, and hang protection
Matching runs in a disposable Web Worker that is terminated after 300 ms, so a catastrophic-backtracking pattern cannot freeze the page. Patterns are passed only to the browser’s RegExp constructor — no eval, no Function.
Patterns and test text stay in the browser. The worker is disposable and terminated after each run.
How to test regex patterns and replacements
- Enter a regular expression, choose flags and type or paste test text.
- Review highlighted matches, match indexes and capture groups. Add replacement text to see a live replacement preview.
- Copy or download the replacement result. Invalid patterns and expressions that exceed the worker time limit produce an error message.
- Try a small representative sample first, then increase the sample up to the 20,000-character limit; timeouts indicate the pattern needs a safer structure.
Regex tester questions, answered
Can a pattern execute JavaScript?
No. The pattern is passed only to the browser's RegExp constructor in a dedicated worker. No eval or Function constructor is used.
Can a slow pattern freeze the page?
The matcher runs in a disposable worker that is terminated after a short time limit. Pattern and sample lengths are also capped.
What flags are supported?
The tester supports g, i, m, s and u. Replacement strings follow the browser's String.replace conventions, including $1 and $<name>.
Does the tester support every JavaScript regex flag?
It supports g, i, m, s, and u. Flags outside that set, including sticky and indices, are not offered in this tester.
Regex Tester: how it compares, and when to use something else
Regex Tester compared against a cli tool or a hosted playground — what runs locally in this workspace, what rules are enforced, and where another kind of tool is the better fit.
Use Regex Tester on QUICKKIT when you want a fast, browser-based workflow without creating an account or handing inputs to a third-party queue; choose a cli tool or a hosted playground when this belongs in ci, a git hook, an editor task or a build script..
