Regex Tester & Debugger
Write a regular expression and see every match highlighted in your test text as you type, with capture groups broken out.
/
/
Matches highlighted
Match details
| # | Match | Index | Groups |
|---|
Quick reference
. any character\d digit\w word character\s whitespace\b word boundary^ start of string$ end of string* zero or more+ one or more? optional{2,5} between 2 and 5[abc] any of a, b, c[^abc] none of a, b, c(x) capture group(?:x) non-capturing(?<n>x) named groupx|y x or y(?=x) lookaheadAbout the regex tester
Regular expressions are far easier to debug when you can see what they match. Type a pattern and matches highlight live in the sample text, with a detail panel listing each match, its position and the contents of every capture group, including named groups. All JavaScript flags are supported: global, case-insensitive, multiline, dotAll, unicode and sticky. A quick reference for the common tokens sits alongside so you do not need to keep another tab open.
How to use the regex tester
- Enter your regular expression pattern, without the surrounding slashes.
- Toggle the flags you need, such as g for global and i for case-insensitive.
- Paste sample text into the test area to see matches highlighted live.
- Check the match details panel for positions and capture group contents.