logoDevDeck

Regex Playground

Test and debug regular expressions with real-time matching and highlighting

Regular Expression
Enter your regex pattern below.
Test String
Enter the text you want to test your pattern against.
Highlighted Matches2 matches
Contact us at support@example.com or sales@company.org for more information.
Match Details
Match 1Index: 14
support@example.com

Capture Groups:

1support
2example.com
Match 2Index: 37
sales@company.org

Capture Groups:

1sales
2company.org
Substitution
Replace the matched text using a substitution pattern. Use $1, $2, etc. for capture groups.
Contact us at user-support@example.com or user-sales@company.org for more information.
Common Patterns
Click to use a frequently used regex pattern.
Regex Quick Reference
A quick guide to common regex syntax.

Common Tokens

.Any character except newline
\wAny word character (a-z, A-Z, 0-9, _)
\dAny digit (0-9)
\sAny whitespace character
\bWord boundary
^Start of string (or line with 'm' flag)
$End of string (or line with 'm' flag)

Quantifiers

*0 or more times
+1 or more times
?0 or 1 time (optional)
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times

Groups & Lookarounds

(...)Capturing group
(?:...)Non-capturing group
[...]Character set
(?=...)Positive lookahead
(?!...)Negative lookahead