Regex Tester
Test regular expressions against sample text with live match highlighting and capture group extraction.
Disclaimer: This tool runs entirely in your browser -- nothing you enter is sent to or stored on our servers.
Regex Syntax Quick Reference
Regular expressions (regex) are patterns for matching, searching, and manipulating text. Core syntax: . (any character), * (0 or more), + (1 or more), ? (0 or 1), ^ (start), $ (end), [] (character class), () (capture group), | (OR). Quantifiers: {n} (exactly n), {n,m} (between n and m).
Common patterns: email validation ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$; Indian mobile number ^[6-9]\d{9}$. Flags: g (global -- find all matches, not just the first), i (case-insensitive), m (multiline -- ^ and $ match per line rather than per string). This tester highlights every match in real time as you type, making it fast to iterate on a pattern.
Worked Example
Pattern \b\w+@\w+\.\w+\b with the g flag against the sample text "Email me at hello@smartutilz.com or support@example.org" finds 2 matches: hello@smartutilz.com and support@example.org -- demonstrating a simplified (non-RFC-complete) email pattern useful for quick validation.