Regex Tester

Write a regex, paste some text, and see every match highlighted as you type.

//g
#MatchIndexGroups

● Your files are processed locally in your browser and are not uploaded to our servers.

How it works

The regex runs with your browser's JavaScript engine, exactly as it would in your code (new RegExp(pattern, flags)). Every match is highlighted, and the table lists the index and capture groups, including named groups. The replace field accepts the same $1, $<name> and $& syntax as String.replace().

FAQ

Is this PCRE (PHP) or Python syntax?

It's JavaScript syntax. Most common patterns work the same everywhere, but lookbehind, possessive quantifiers and some flags differ between languages.

Can a regex freeze the page?

Badly written patterns (catastrophic backtracking) can be very slow. KadiTools stops after 10,000 matches.