See matches highlighted in real-time as you type your pattern.
Toggle global, case-insensitive, multiline, dotAll, and Unicode flags.
One-click patterns for email, URL, phone, IP, date, and more.
Uses your browser regex engine. No server, works offline.
/
/g
Regular expressions (regex) are patterns used to match character combinations in strings. They are essential for text processing, validation, search-and-replace operations, and data extraction. This tool lets you write, test, and debug regex patterns with instant visual feedback.
Start with simple patterns and build up. Use the preset patterns as starting points. Remember to escape special characters (. * + ? ^ $ { } [ ] | ( ) \) with a backslash when you want to match them literally. Use capture groups to extract specific parts of a match, and use non-capturing groups (?:...) when you only need grouping without capturing.
This tool supports all standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll - dot matches newlines), and u (Unicode). Toggle any combination of flags using the flag buttons.
Yes, completely free with no limits. Test as many patterns as you want. No signup or account required.
Yes. Named and numbered capture groups are fully supported. When your pattern contains groups, the match details panel shows each group value alongside the full match.
We provide quick-start presets for Email, URL, Phone Number, IPv4 Address, Date (YYYY-MM-DD), Hex Color, HTML Tag, and Number patterns. Click any preset to load it instantly.
Yes. All regex testing happens in your browser using native JavaScript regex engine. No data is sent to any server. The tool works offline after the page loads.
Enable the m (multiline) flag to make ^ and $ match the start/end of each line. Enable the s (dotAll) flag to make the dot (.) match newline characters as well.
Explore more free tools to boost your productivity