Vaultools
network requests sent: 0

Regex Tester

Type a pattern and some text to test it against — matches, capture groups, and a live replacement preview all update as you type. Matching runs using your browser's own JavaScript engine, so nothing you enter ever leaves this page.

/ /

Batch mode

Ad · placeholder

Your ad could be here — privacy-respecting, no tracking.

Go Pro to remove this →

Why test regex in the browser?

Regex testers are a classic "paste something you're actively working on" tool — often a log line, a URL pattern, or a validation rule pulled straight out of production code. Nothing you paste here is ever sent to a server — see why that matters. Matching, capture groups, and the replacement preview are all recomputed on every keystroke using your browser's own RegExp engine — check your network tab while you use it.

Flags reference

This tool matches using JavaScript's native RegExp (the ECMAScript flavor) — mostly compatible with PCRE (Python, PHP, grep -P), but not identical, so a pattern copied from another language's docs can behave slightly differently here.

g
Global — find all matches instead of stopping at the first.
i
Case-insensitive matching.
m
^ and $ match the start/end of each line, not just the whole string.
s
Dot-all — lets . also match newline characters.
u
Unicode mode — treats the pattern and string as full Unicode code points, not UTF-16 code units.
y
Sticky — matches only starting at the current position, rather than scanning forward.

FAQ

Why does my pattern match zero results even though it looks right?

The usual culprits: a special character (. * + ? ( ) [ ] ^ $ |) that needed escaping but wasn't, a greedy quantifier consuming more than intended, or forgetting the i flag when the text's case doesn't match the pattern.

Are named capture groups supported?

Yes — (?<name>...) groups are supported by JavaScript's engine and shown separately from numbered groups in the match results above.