Damoa - Handy Tools

Regex Tester

Test regular expressions and see matches in real-time.

//g
How to Use Enter your regex pattern in the pattern field (without surrounding slashes). Select flags like g (global), i (case-insensitive), or m (multiline) as needed. Type your test string below. Matching portions are highlighted in real time as you type. The match list shows all captured groups. Who Is This For Developers writing log parsers, input validators, or string replacement logic. Beginners learning regex who want immediate visual feedback. Engineers who need to verify complex patterns before deploying them in production code. Key Features • Real-time match highlighting • Flag selection (g, i, m, s) • Capture group results display • Match count • Replace preview Frequently Asked Questions Q: How do I match Unicode or non-Latin characters? A: Use Unicode property escapes like \p{L} for any letter, or specific ranges like \u0041-\u005A for A-Z. Q: What's a good pattern for validating email addresses? A: ^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$ works for most cases, though email validation is notoriously complex. Q: What is the difference between greedy and lazy matching? A: .* matches as much as possible (greedy). .*? matches as little as possible (lazy). Tips Break complex patterns into groups () and test each part step by step. The g flag is essential when you need to count or replace all occurrences, not just the first. Use \d, \w, and \s shortcuts to keep patterns concise.

Send result to another tool

Share