Skip to main content
DataValidate Pro |

RegEx Tester

Test and debug regular expressions with live matching, explanations, and common pattern examples. Perfect for developers working with text processing and validation.

Regular Expression

//

Test String

Common Patterns

Email Address
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Match valid email addresses
Phone Number (US)
^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
Match US phone numbers
URL
https?://[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(/[^\s]*)?
Match HTTP/HTTPS URLs
IP Address
\b(?:\d{1,3}\.){3}\d{1,3}\b
Match IPv4 addresses
Hex Color
#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})\b
Match hexadecimal color codes
Date (YYYY-MM-DD)
\d{4}-\d{2}-\d{2}
Match ISO date format
Username
^[a-zA-Z0-9_]{3,16}$
Match valid usernames (3-16 chars)
Credit Card
\d{4}[-.\s]?\d{4}[-.\s]?\d{4}[-.\s]?\d{4}
Match credit card numbers

RegEx Quick Reference

Character Classes

  • . - Any character
  • \d - Digit (0-9)
  • \w - Word character
  • \s - Whitespace
  • [abc] - a, b, or c
  • [^abc] - Not a, b, or c
  • [a-z] - Range a to z

Quantifiers

  • * - 0 or more
  • + - 1 or more
  • ? - 0 or 1
  • {3} - Exactly 3
  • {3,} - 3 or more
  • {3,5} - 3 to 5

Anchors

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

Groups

  • (abc) - Capture group
  • (?:abc) - Non-capturing
  • \1 - Backreference

Alternation

  • a|b - a or b
  • (a|b) - Group a or b

Lookaround

  • (?=abc) - Positive lookahead
  • (?!abc) - Negative lookahead

Need to format text? Check out for text styling and formatting tools.

© 2024 DataValidate Pro. Developer tools for data validation & conversion.

For more developer tools, visit texttoolbox.io.

DataValidate Pro

Developer data validation & conversion suite

Privacy First

All processing happens in your browser. Your data never leaves your device.

Read our Privacy Policy →

© 2025 DataValidate Pro

Free tools for developers

Disclaimer: The tools provided on DataValidate Pro are for informational and development purposes only. While we strive for accuracy, these tools should not be relied upon for critical business decisions, legal compliance, security assessments, or production deployments without proper validation. Always verify results independently and consult with qualified professionals for important decisions. We make no warranties about the accuracy, reliability, or completeness of any conversions or validations performed by these tools.