Regex Tester
Test a regular expression against sample text and see matches, groups, and flags highlighted live.
Highlighted matches
0 match(es)
Test a regular expression against live text
Type a pattern, choose your flags, and paste sample text — matches are highlighted
inline and listed below with their capture groups, updating as you type. Uses your
browser's native RegExp engine, so behavior matches exactly what you'd get in
JavaScript code.
Frequently asked questions
What do the g, i, m, and s flags do?
"g" (global) finds every match instead of stopping at the first one — almost always what you want when testing. "i" makes the match case-insensitive. "m" makes ^ and $ match the start/end of each line instead of just the whole string. "s" (dotall) lets . match newline characters too, which it doesn't by default.
Why does my pattern match nothing even though it looks right?
Common causes: forgetting the "g" flag so only the first match is found (this tool always searches globally, so that specific issue won't hide results here), unescaped special characters like . or ( that need a backslash to be treated literally, or a typo in a character class like [a-z] vs [a-Z].
Does this show capture groups?
Yes — each match is listed with its full text and, if your pattern includes parentheses to capture groups, each group's matched value is shown underneath it.
Is my pattern or test text sent anywhere?
No — everything runs through your browser's native RegExp engine directly in the page. Nothing is sent to a server.