Regex Tester

Validate and test JavaScript regular expressions dynamically against textual patterns with colored highlights. Real-time matching.

/ /
Test Subject Text
Matching Visual Highlights
Regex highlighting results will appear here...
No execution stats

How to Use the Regex Tester

Enter your regular expression pattern in the pattern field above (without the surrounding slashes). Then type or paste your test text in the left panel. Matches will be highlighted in the right panel in real-time as you type.

Regex Flags Reference

  • g (global): Find all matches, not just the first one.
  • i (ignoreCase): Make the match case-insensitive.
  • m (multiline): Treat ^ and $ as start/end of each line.

Common Regex Patterns

  • Email validation: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
  • URL pattern: https?:\/\/[\w\d./?=#]+
  • Phone number: \d{3}[-.]?\d{3}[-.]?\d{4}
  • IP address: \b(?:\d{1,3}\.){3}\d{1,3}\b