Regex Tester

Test and debug regular expressions with live matching, explanations, and common patterns

Regular Expression

//g

Test String

0 matches found
The quick brown fox jumps over the lazy dog. Email: test@example.com Phone: (555) 123-4567

Test Cases

Add test cases to validate your regex against multiple inputs

Quick Reference

.

Matches any single character except newline

*

Matches 0 or more of the preceding element

+

Matches 1 or more of the preceding element

?

Makes the preceding element optional (0 or 1)

^

Matches the start of a string (or line in multiline mode)

$

Matches the end of a string (or line in multiline mode)

\d

Matches any digit (0-9)

\D

Matches any non-digit character

\w

Matches word characters (letters, digits, underscore)

\W

Matches non-word characters

\s

Matches whitespace (space, tab, newline)

\S

Matches non-whitespace characters

\b

Matches a word boundary

\B

Matches a non-word boundary

|

Alternation - matches either pattern

[]

Character class - matches any character inside