About Regex Tester
Our Regex Tester is a free online tool for testing and debugging regular expressions. Whether you're validating input, parsing text, or building complex search patterns, this tool gives you instant visual feedback with match highlighting and capture group inspection.
Common Regex Patterns
Use our built-in regex cheat sheet to quickly add common patterns to your test. Includes email validation, URL matching, phone numbers, dates, currency amounts, and more. Simply click any pattern to load it instantly.
How to Write Regular Expressions
Regular expressions (regex) are patterns used to match character combinations in strings. Start with basic character classes like \d for digits, \w for word characters, and \s for whitespace. Combine with quantifiers like + (one or more), * (zero or more), and ? (zero or one) to create flexible patterns. Use character classes [a-z] for ranges and alternation | for OR logic.
Key Features
- Live Match Highlighting: See all matches highlighted in your test string in real-time as you type.
- Flag Support: Toggle the five standard JavaScript regex flags:
g(global),i(case-insensitive),m(multiline),s(dotAll), andu(unicode). - Capture Groups: View all capture groups for each match, including their index and value.
- Common Regex Reference: Click any pattern in the reference sidebar to instantly load it into the tester.
- Error Reporting: Invalid patterns show clear error messages instantly.
All processing happens in your browser. No data leaves your device.