Regex Tester

Pattern and test text

Flags
Empty/g

Matches

Run the test to see matches and highlighted text.

Not runJavaScript RegExp

About this Regex Tester

Test JavaScript regular expressions and inspect matches directly in your browser.

Patterns run through the browser's own RegExp engine, so what matches here is exactly what matches in your code. Write the pattern body only — the delimiting slashes are implied, and the flags are set with the pills instead. Every match runs on a background thread with a one-second cutoff, so a pathological pattern (catastrophic backtracking) times out that one run instead of freezing the tab.

FAQ

Does this support the same regex syntax as regex101 or Python?

This uses native JavaScript (ECMAScript) regex semantics — the same engine your frontend or Node.js code runs. Most patterns port to PCRE/Python, but lookbehind support and escape rules can differ — test in the engine you actually deploy to.

What do the flags g, i, m, s mean?

g finds all matches instead of stopping at the first; i ignores case; m makes ^/$ match per line; s lets . also match newlines.

Why is my pattern matching nothing?

Most common causes: an unescaped special character (. + ? ( ) [ ]), or forgetting the g flag when expecting multiple matches.

How do capture groups work?

Wrap part of your pattern in parentheses () — e.g. (\d{4})-(\d{2})-(\d{2}) captures year, month, and day as three separate groups.

Can I test find-and-replace here, not just matching?

Use the Regex Replace Tester for that — this tool focuses on matching and inspecting groups.

Is my pattern or test text sent anywhere?

No — matching runs entirely in your browser.

Related tools