Regex Tester
Write a pattern, paste test text, and see every match — and every capture group — highlighted instantly.
Pattern
Highlighted preview
Match details
Test regular expressions without leaving your browser
Write a pattern, paste in test text, and every match highlights live — including each capture group, listed separately below with its own index. Toggle the g flag to find every match instead of just the first, or add i for case-insensitive matching.
Common flags
g (global) finds all matches instead of stopping at the first. i (case-insensitive) ignores letter case. m (multiline) makes ^ and $ match the start/end of each line rather than the whole string. s (dotAll) lets . match newline characters too.
Also useful: JSON Formatter & Validator and Word Counter.
Frequently asked questions
Without the g (global) flag, a regex only matches the first occurrence. Add g to the flags field to find every match in the test string.
Any part of your pattern wrapped in parentheses ( ) is a capture group. Each match lists its groups in order, which is useful for pulling specific pieces out of a larger match.
Yes — this uses your browser's native JavaScript regex engine, so any syntax it supports (including lookahead/lookbehind and named groups) works here.