Why use this regex tester?
- Test JavaScript regex behavior locally in the browser.
- Toggle `g`, `i`, `m`, `s`, and `u` flags without rewriting the whole expression.
- See match positions, capture groups, and replacement output in one place.
- Keep pattern and test text out of the share URL and browser history.
Wave 4 dev-data expansion
Test a JavaScript regex
Choose a preset or enter your own pattern. The copied settings URL stores only the active preset and flags.
Inputs
Test text
Regex result
Highlighted preview
Replace result
Matches and capture groups
This page follows browser JavaScript regex rules
The browser compiles your pattern with the built-in JavaScript `RegExp` engine. That means browser-supported syntax, browser-supported flags, and JavaScript replacement rules. If a pattern works in a PCRE-focused tool but fails here, the syntax probably belongs to a different regex engine.
What the flags mean
g finds multiple matches, i ignores case, m changes ^ and $ to work per line, s lets dot match newlines, and u enables Unicode-aware parsing.
Use this as a lightweight tester
This page is meant for quick match checks, capture groups, and replacement output. It does not aim to replace a full IDE debugger, syntax tree explorer, or PCRE-heavy environment.
Frequently asked questions
Does this use JavaScript regex rules or PCRE?
This page uses the browser JavaScript RegExp engine. PCRE-only features that do not exist in JavaScript are not supported here.
What do the flags g, i, m, s, and u mean?
g finds multiple matches, i ignores case, m changes ^ and $ to work per line, s lets dot match newlines, and u enables Unicode-aware parsing.
Why does the share URL not include my pattern or test text?
This page copies a settings-only URL so your pattern, test text, and replacement text do not end up in the address bar, browser history, or shared links.
Is this meant to replace a full IDE regex debugger?
No. This page is a lightweight tester for quick checks, matches, capture groups, and replacement output. It does not aim to replace a heavy debugger or PCRE-focused tool.
Related
Comments (optional)
To reduce load, comments are fetched only when needed.