Regex Tester Tool

Test JavaScript regular expressions against sample text, review capture groups, and preview replacement output without leaving the browser.

Use this page for fast browser-side `RegExp` checks. It is intentionally lighter than a full IDE debugger and does not target PCRE-only features.

Other languages 日本語 English

Why use this regex tester?

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.

Comments (optional)

To reduce load, comments are fetched only when needed.