Regex Tester

Test regular expressions with real-time matching and highlighting

Debug and test regular expressions (regex) with live highlighting and match results. See what your pattern matches in real-time as you type. Perfect for validating email addresses, phone numbers, URLs, or any text pattern. Supports all JavaScript regex flags and provides detailed match information.

Regular Expression

Quick Reference

Character Classes

\d - Digit (0-9)
\w - Word char (a-z, A-Z, 0-9, _)
\s - Whitespace
. - Any character
[abc] - a, b, or c
[^abc] - Not a, b, or c

Quantifiers

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

Anchors

^ - Start of line
$ - End of line
\b - Word boundary
\B - Not word boundary

Groups

(abc) - Capture group
(?:abc) - Non-capturing group
a|b - a or b

How to Use

  1. 1 Enter your regular expression pattern in the regex field
  2. 2 Add flags like 'g' (global), 'i' (case-insensitive), or 'm' (multiline) as needed
  3. 3 Type or paste test text in the test string field
  4. 4 See matches highlighted instantly in the results
  5. 5 Review match details including captured groups and positions