Regex Tester
Type a regex pattern and watch matches highlight in real time. Captures and named groups are listed per match.
100% in your browser. Files never uploaded.
9 matches
Hello, world! Try a regex like \b\w+\b.
Match 1 at index 0
Hello
Match 2 at index 7
world
Match 3 at index 14
Try
Match 4 at index 18
a
Match 5 at index 20
regex
Match 6 at index 26
like
Match 7 at index 32
b
Match 8 at index 34
w
Match 9 at index 37
b
How to use
- 1Type a patternAnything valid as a JavaScript RegExp.
- 2Toggle flagsClick any flag to add or remove it. The "g" flag is auto-applied so all matches are listed.
- 3Read matchesHighlights in the test text and a per-match breakdown of groups and named captures.
FAQ
Which regex flavor?
JavaScript regex — same syntax as the RegExp constructor. Lookbehind, named groups, unicode property escapes — all supported.
Why is my pattern showing 5,000 matches max?
A safety limit to prevent infinite loops on zero-width patterns. Refine the pattern if you genuinely need more.