Regex Tester
Test and debug regular expressions with real-time feedback.
Regex Pattern
Test String
Matches
Highlighted Matches
How to Use the Regex Tester
Enter a regular expression pattern in the top field and a test string in the text area below. The tool will automatically highlight all matches and display detailed information about each match, including captured groups.
Features
- Real-time Testing - See matches update instantly as you type your pattern or test string.
- Match Highlighting - Visualize matches directly in your test string with clear highlighting.
- Regex Flags Support - Toggle various regex flags like global, case-insensitive, multiline, and more.
- Capture Groups - View and analyze captured groups from your regular expressions.
Common Regex Patterns
Match valid email addresses.
Match web URLs including http and https protocols.
Match various phone number formats with optional country codes.
Match dates in ISO format (YYYY-MM-DD).
Regex Flags Explained
- gGlobal search - find all matches rather than stopping after the first match.
- iCase-insensitive search - ignore differences between uppercase and lowercase letters.
- mMultiline mode - ^ and $ match the start/end of each line, not just the whole string.
- sDot matches all - allows . to match newline characters.
- uUnicode support - treat pattern as a sequence of Unicode code points.
- ySticky mode - match at the current position in the target string only.
Related Tools
JSON Formatter
Format, validate, and beautify your JSON data with this free online JSON formatter. Features include JSON validation, beautification, and minification.
Use ToolBase64 Encoder/Decoder
Encode text to Base64 or decode Base64 to text with this free online Base64 encoder/decoder tool.
Use ToolHTML Minifier
Compress HTML by removing whitespace, comments, and more with this free online HTML minifier tool.
Use Tool