Regex Tester

Test regular expressions with real-time matching and highlighting. Perfect for validating patterns, extracting data, and learning regex syntax.

Regular Expression Pattern

//g

Test String

Match Results

Enter a pattern and test string to see matches

Quick Regex Reference

Character Classes

. - Any character
\d - Digit (0-9)
\w - Word character
\s - Whitespace
[abc] - Any of a, b, c
[a-z] - Any lowercase letter

Quantifiers

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

Anchors

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