Email validation pattern
Before
Regex worked on 90% of test emails, failed on a few
After
Added `i` flag — emails with capital letters matched
The bug was case sensitivity. Two seconds to fix once I saw the pattern failing live.
I built this because I got tired of testing regex one character at a time in the browser console. Paste your pattern and sample text, see matches highlighted live, adjust the flags, and iterate. JavaScript (ECMAScript) syntax — same as what runs in your app.
Highlighted matches (5)
Your files are processed in your browser and never uploaded to any server.
The most common regex bug I run into is missing the global flag. Without `g`, `.match()` and `.replace()` only work on the first match. It looks like the pattern works — until it doesn't. Always test with a string that has multiple matches. Also, if your pattern has a capture group inside a quantifier, you're probably not getting the behavior you expect. Test it here first.
— Mirza Noman Baig
These are actual measurements from using this tool, not estimates.
Before
Regex worked on 90% of test emails, failed on a few
After
Added `i` flag — emails with capital letters matched
The bug was case sensitivity. Two seconds to fix once I saw the pattern failing live.
Before
Pattern matched the first log entry but not the rest
After
Added `g` flag — all entries matched
Classic missing global flag. This tool makes it obvious because only the first match highlights.
Before
Pattern worked on single lines, failed across newlines
After
Enabled `m` and `s` flags — matched across the whole document
Understanding m vs s is confusing. Testing both here made the difference obvious.
Matches highlight as you type — patterns and text both update in real time.
g, i, m, s, u, y — all standard JavaScript regex flags.
Shows match count, positions, and captured groups.
Invalid patterns show clear errors. No guessing.
JavaScript (ECMAScript). The same syntax your browser and Node.js use.
g = global (all matches), i = case-insensitive, m = multiline (^ and $ match line breaks), s = dotAll (. matches newlines), u = unicode, y = sticky.
No. Everything runs in your browser. Your patterns and test text never leave your device.
Yes. Invalid patterns produce a clear error message so you can fix them.
The tool focuses on matching. For replace testing, copy the matched output into your code and test there.