Home · Tools · Regex Tester

Regex Tester

Test regular expressions with live highlights, capture groups and presets.

Test string 0 matches
Highlighted
Matches & groups

      

Regex tester with live highlighting and capture groups

Test JavaScript regular expressions with live highlights, colored capture groups, and a full match table. Includes presets for the patterns you actually need (email, URL, UUID, IPv4, hex color, E.164 phone) so you don't have to hunt them down again.

What's highlighted

Each full match gets a purple background. Capture groups inside that match get cycling colors (cyan, green, amber, red) so you can see at a glance what each parenthesized group caught. The match table below shows position, full match, and group values.

Flags supported

Notes on JavaScript regex

JS regex is mostly PCRE-compatible but has quirks: no possessive quantifiers, lookbehind support varies by browser age, and named groups use (?<name>...). The tester runs in your actual browser so the behavior here matches your runtime exactly.

Related tools

FAQ

Why does my pattern hang the page?
Catastrophic backtracking. Patterns like (a+)+ on long input have exponential time. Simplify alternations or anchor the pattern.
Can I use lookbehind?
Modern Chrome, Edge, Firefox 78+ and Safari 16.4+ support it. Older Safari does not.
Are matches limited?
Yes — the tester stops at 10,000 matches to keep the UI responsive.
Does it test PCRE/Python regex?
No, this uses JavaScript's RegExp engine. Patterns mostly transfer but exact behavior differs.