Regex Tester

Test regular expressions in real-time

Test and debug regular expressions online. Real-time matching with highlighted results, match groups, and a quick-reference cheat sheet. All processing happens in your browser.

//g
Contact us at support@example.com or sales@company.org.
Invalid emails: user@, @domain.com, plain-text
Valid: dev.team+tag@startup.io, hello@sub.domain.co.uk
#MatchIndexGroups
1support@example.com14-
2sales@company.org37-
3dev.team+tag@startup.io110-
4hello@sub.domain.co.uk135-

Common Patterns

Cheat Sheet

. Any character
\d Digit [0-9]
\w Word char [a-zA-Z0-9_]
\s Whitespace
^ Start of string
$ End of string
* 0 or more
+ 1 or more
? 0 or 1
{n} Exactly n
{n,m} Between n and m
[abc] Character set
[^abc] Negated set
(abc) Capture group
a|b Alternation
(?:abc) Non-capturing group
(?=abc) Lookahead
(?<name>abc) Named group