Regex Tester

Test and validate regular expressions with real-time matching, syntax highlighting, and detailed results. Perfect for pattern matching, data validation, and text processing.

//
No text to display
Enter pattern and test string to see matches
Email Validation

Matches email addresses

/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g
Phone Numbers

Matches US phone numbers

/\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4}/g
URLs

Matches HTTP/HTTPS URLs

/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g
HTML Tags

Matches HTML tags

/<\/?[a-z][a-z0-9]*[^<>]*>/gi

Regex Quick Reference:

Character Classes
  • . - Any character
  • \d - Any digit (0-9)
  • \w - Word character
  • \s - Whitespace
Quantifiers
  • * - 0 or more
  • + - 1 or more
  • ? - 0 or 1
  • {n,m} - Between n and m
Anchors
  • ^ - Start of string
  • $ - End of string
  • \b - Word boundary
  • \B - Non-word boundary

All Tools