$regex-tester
Testers
Test regular expressions with live match highlighting, capture group inspection, and a handy cheatsheet. Everything runs in your browser.
//g
Flags
Match Highlighting
Matches appear here...
// how-to
How to test a regular expression
Iterate on a regex against real input with live match highlights and a capture-group preview.
Enter the pattern
Type your regex into the pattern field, without the surrounding slashes.
Pick the flags
Toggle global, case-insensitive, multiline, dotAll, sticky, and unicode flags.
Add test input
Paste sample text into the input area. Matches highlight live as you type.
Inspect capture groups
Named and numbered groups are listed alongside each match for quick verification.
// faq
- ? Which regex flavor does this use?
- Standard JavaScript regex (ECMAScript). Most Python, Java, and PCRE patterns work, but some lookaround and Unicode features differ.
- ? How do I avoid catastrophic backtracking?
- Avoid nested quantifiers like (a+)+ and use atomic groups or possessive quantifiers where supported. Test on pathological inputs.
- ? Are backreferences supported?
- Yes. Use \1 or \k<name> in the pattern. The tool shows the matched group values.