Free Online Regex Tester
Test your regular expressions against sample text with live match highlighting: every match is highlighted, grouped by color, and listed with its capture groups below. Toggle flags g (global), i (ignore case), m (multiline), s (dot-all), and u (unicode) and watch the results update instantly. Everything runs in your browser — your regex and text never leave your device.
Common Regex Examples
Email: \b[\w.+-]+@[\w-]+\.[\w.]+\b · Phone: \+?\d[\d\s()-]{7,}\d · URL: https?://[\w.-]+ · Hex color: #(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b · IP: \b(?:\d{1,3}\.){3}\d{1,3}\b. Load the sample to see highlighting in action, then paste your own pattern.
Regex Tester FAQ
Why use a regex tester? Regex is error-prone — a tester shows you immediately whether your pattern matches what you think. What flags should I use? Use g to find all matches (not just the first), i for case-insensitive, s to make . match newlines. Is my data sent anywhere? No — matching runs 100% locally with JavaScript's built-in RegExp engine.