Regex Tester & Reference

Test regular expressions with live match highlighting and capture groups

Matches Highlighted

No matches

Example Patterns

Quick Reference

. Any character
\d Digit (0-9)
\w Word character
\s Whitespace
^ Start of line
$ End of line
* 0 or more
+ 1 or more
? 0 or 1
{n} Exactly n times
[abc] Character class
(x) Capture group

Need more text manipulation tools?

Try RegEx Kit →

Character Classes

\d Digit [0-9]
\D Non-digit
\w Word [A-Za-z0-9_]
\W Non-word
\s Whitespace
\S Non-whitespace

Quantifiers

* 0 or more
+ 1 or more
? 0 or 1
{n} Exactly n
{n,} n or more
{n,m} Between n and m

Anchors & Boundaries

^ Start of string/line
$ End of string/line
\b Word boundary
\B Non-word boundary