Regex Tester
Test and debug regular expressions with real-time matching, capture groups, and replace preview.
Match Details
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | support@example.com | 14 | - |
| 2 | sales@company.co.uk | 37 | - |
| 3 | hello@test.org | 70 | - |
Common Patterns
Pattern Explanation
- . - Any character (except newline)
- + - One or more occurrences
Quick Reference
. Any char\d Digit\w Word\s Space* 0+ times+ 1+ times? Optional^$ Start/EndHow to use Regex Tester
- 1
Enter Pattern
Type your regular expression pattern in the pattern field.
- 2
Set Flags
Toggle flags: g (global), i (ignore case), m (multiline), s (dotall), u (unicode).
- 3
Test String
Paste or type the text you want to test against the pattern.
- 4
Review Matches
See highlighted matches, capture groups, and match details in real-time.
Related Tools
JWT Decoder
Decode JWT tokens locally. View header, payload, claims, and expiration without sending data.
Cron Expression Generator
Build cron expressions visually. Get human-readable translations and next execution times.
Color Converter
Convert between HEX, RGB, HSL, CMYK and more. Includes contrast checker and palette generator.
Markdown Previewer
Live Markdown editor with GitHub Flavored Markdown support, syntax highlighting, and export options.
Frequently Asked Questions
What are regex flags?
Flags modify regex behavior: g (find all matches), i (ignore case), m (^ and $ match lines), s (dot matches newlines), u (unicode support).
How do capture groups work?
Use parentheses () to create capture groups. Access them in replacements with $1, $2, etc. The full match is $&.
Why is my regex not matching?
Check for proper escaping (use \ for special chars), ensure flags are correct, and verify your pattern syntax.
What is the difference between * and +?
* matches zero or more occurrences, + matches one or more. Use * when something is optional, + when required.
How do I match special characters literally?
Escape them with backslash: \. matches a literal dot, \+ matches a plus sign, etc.