Developer Tools
Regex Tester
Test regular expressions against sample text in real time. See matches, capture groups, and match positions instantly.
Free · Runs in your browser · No signup · Files stay on your device
Paste test text, keep line numbers visible, and inspect matches or regex errors without leaving fullscreen mode.
Quick examples
555-123-4567800-555-0199How to use
How to use Regex Tester
- 1Enter your regular expression pattern (without delimiters).
- 2Set flags (g, i, m, s, u) as needed.
- 3Paste or type test text.
- 4Matches appear instantly with index positions and capture groups.
Tips
Quick tips
- Use the 'g' flag for global matching (find all matches), 'i' for case-insensitive, 'm' for multiline.
- Capture groups are shown for each match — useful for extracting parts of a pattern.
- Be careful with greedy quantifiers (.*, .+) — they match as much as possible. Use .*? for lazy matching.
FAQ
Frequently asked questions
Do I need to include / delimiters?
No. Enter the pattern only (e.g., \d+ not /\d+/g). Set flags separately in the flags field.
What flags are supported?
g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode). Combine them like 'gi'.
What are capture groups?
Parentheses in a regex create capture groups. For example, (\d{3})-(\d{4}) captures the area code and number separately.
Is my data sent anywhere?
No. Regex matching runs entirely in your browser using JavaScript's native RegExp engine.
Related