john.doe@example.com Jane Smith <jane@company.org> Invalid email: not-an-email support@bigdevsoon.me Contact us at info@test.co.uk today
Settings
RegEx Tester
DataTest and debug regular expressions with real-time match highlighting. Supports flags, capture groups, and common presets.
What are regular expressions?
Regular expressions (regex) are patterns used to match character combinations in strings. They are supported in virtually every programming language and are essential for text processing tasks like validation (emails, phone numbers, URLs), search and replace, data extraction, log parsing, and input sanitization. Despite their power, regex syntax can be cryptic — a live tester with instant visual feedback makes writing and debugging patterns dramatically faster.
How to use this regex tester
Enter your regex pattern in the pattern field and your test string in the text area below. Matches are highlighted in real time as you type. Toggle flags like global (g), case-insensitive (i), multiline (m), and dotAll (s) to change matching behavior. Capture groups are displayed separately so you can verify that your parenthesized sub-patterns extract the right data. Use the preset buttons to quickly load common patterns for emails, URLs, IP addresses, dates, and more.
Common regex patterns for developers
Email validation, URL matching, IPv4 addresses, ISO dates, phone numbers, hex colors, and credit card formats each have well-known regex patterns. For example, a simple email pattern checks for word characters before and after an @ symbol with a valid domain extension. An IPv4 pattern matches four groups of 1–3 digits separated by dots. This tool lets you test any pattern against sample data before using it in your code, saving debugging time and preventing production issues.
Frequently Asked Questions
What regex flags are supported?
This tool supports all standard JavaScript regex flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), and s (dotAll — dot matches newlines). Toggle them with the checkboxes above the pattern input.
How do capture groups work?
Parentheses in your pattern create capture groups that extract specific parts of a match. For example, (\d{4})-(\d{2})-(\d{2}) on "2026-02-19" captures "2026", "02", and "19" separately. This tool displays all capture groups for each match so you can verify your extraction logic.
Why is my regex not matching?
Common issues: forgetting the global flag (only first match found), not escaping special characters like dots and brackets, anchoring with ^ and $ when matching mid-string, or missing the multiline flag for line-by-line matching. Check the flags and try removing anchors to debug.
Part of 23+ free developer tools from BigDevSoon
Want to create your own tool?
Try our free Demo editor or start a 7-day trial with all features included.
No signup needed for demo editor
More Developer Tools
JSON Formatter
Format, validate, and minify JSON data with line numbers. Real-time validation as you type.
Code Diff Checker
Compare two blocks of text or code side by side. See additions, deletions, and changes highlighted in green and red.
File Compressor
Compress images, PDFs, documents, ZIP archives, and code files in your browser with before/after comparison.