Regex Tester
Test regular expressions with real-time match highlighting. Supports flags and capture groups.
//
How to Use
- Enter your regular expression pattern in the regex input field. Add flags like g (global), i (case-insensitive), m (multiline), s (dotall), and u (unicode) using the toggle buttons below the input.
- Paste or type your test strings in the text area — one per line or as a block of text. Matches highlight in real time as you type, showing captured groups in different colors.
- Inspect each match and its capture groups in the results panel below. Copy individual matches, all matches, or the full match details for use in your code.
Frequently Asked Questions
- What regex flags are supported?
- The tester supports all standard JavaScript regex flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), s (dotAll — . matches newlines), and u (unicode — enables full Unicode matching).
- Can I test common patterns like email or URL validation?
- Yes — the tester handles any valid regex pattern. You can test email validation, URL matching, phone numbers, IP addresses, HTML tags, or any custom pattern. Use the test string area to try multiple inputs and verify your pattern handles edge cases correctly.
- How do I escape special characters in my regex?
- Prepend special regex characters ( . * + ? ^ $ curly braces [ ] ( )