Regex Tester
How to use Regex Tester
Enter your regex pattern in the pattern field. Toggle flags (g, i, m, s) as needed. Type or paste your test string below. Matches are highlighted in real-time in the test string, and a match list shows each match with its index, value, and capture groups. Use the common patterns buttons to quickly insert pre-built patterns.
Features
- Real-time match highlighting
- Capture group display
- Flag toggles: g, i, m, s
- Common pattern presets (email, URL, phone, IP, date)
- Match list with index and groups
Frequently Asked Questions
What regex flags are supported?
This tool supports four flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), and s (dotAll — dot matches newlines).
How do I see capture groups?
Add parentheses in your pattern to create capture groups. Each match in the results list shows its capture groups in brackets, e.g. groups: [value1, value2].
Can I use common patterns like email or URL?
Yes. Click one of the common pattern buttons (Email, URL, Phone, IP Address, Date) to insert a pre-built pattern into the pattern field.