Developer Tools
Regex Tester
Test regular expressions against sample text in real time. See matches, capture groups, and match positions instantly.
1 line • 40 chars
Paste test text, keep line numbers visible, and inspect matches or regex errors without leaving fullscreen mode.
Quick examples
Matches (2)
#1 @5
555-123-4567$1: 555$2: 123$3: 4567
#2 @21
800-555-0199$1: 800$2: 555$3: 0199
Usage notes
- 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.
Related pages
How to Use This Tool
- 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.
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.