Regex Tester
Real-time regex tester with match highlighting, capture group display, flag toggles (g, i, m, s), and a handy regex cheat sheet sidebar.
//
gGlobaliCase-insensitivemMultilinesDotAll
Contact us at hello@example.com or support@test.org for help.
#1
hello@example.comindex 14Group 1:
helloGroup 2: example.com#2
support@test.orgindex 35Group 1:
supportGroup 2: test.org.Any character except newline\dDigit (0-9)\wWord character (a-z, A-Z, 0-9, _)\sWhitespace (space, tab, newline)^Start of string/line$End of string/line*0 or more of preceding+1 or more of preceding?0 or 1 of preceding[]Character class()Capture group|Alternation (OR){n}Exactly n of preceding{n,m}Between n and m of preceding\bWord boundaryHow to Use Regex Tester
- Enter your regular expression pattern in the regex input field.
- Toggle flags: g (global), i (case-insensitive), m (multiline), s (dotAll).
- Paste or type your test string in the text area.
- Matches are highlighted in real-time with different colors for capture groups.
- View match details including group captures, index positions, and match count.
- Reference the cheat sheet for common regex patterns.
Frequently Asked Questions
What regex flags are available?
The tester supports four flags: g (global - find all matches), i (case-insensitive), m (multiline - ^ and $ match line boundaries), and s (dotAll - dot matches newlines).
What are capture groups?
Capture groups are portions of a regex pattern enclosed in parentheses (). They let you extract specific parts of a match. The tool displays each group's content separately.
Does this use JavaScript regex syntax?
Yes, this tool uses JavaScript's built-in RegExp engine, so patterns follow ECMAScript regex syntax.