DEVELOPER TOOL

Regex Tester

Test a regular expression against text and see every match highlighted.

/ /

Match count

About this tool

Type a regular expression and a block of test text to see every match highlighted live, along with a running match count. Toggle flags like g (global), i (case-insensitive), and m (multiline) to change how the pattern matches.

Matching runs entirely in your browser using JavaScript's native regex engine — nothing is sent anywhere.

Frequently asked questions

What happens if my pattern is invalid?
A hint explains what's wrong with the pattern (an unclosed bracket or group, for example) instead of silently showing no matches.
Why do I need the "g" flag to see all matches?
Without the global flag, JavaScript's regex engine only reports the first match — the "g" flag tells it to find every occurrence in the text, which is usually what you want when testing a pattern.
Does this show capture groups?
The highlighted view shows whole matches. This is aimed at quickly confirming what a pattern matches in context, rather than inspecting individual capture groups.