Regex Tester Online — Live Match Highlight + Cheatsheet
Test regex patterns realtime with match + capture group highlights. 7 built-in common patterns (email, URL, VN phone, IPv4, hex, UUID, date). Replace mode bonus.
Order #1234, total: $56.78, tax: $5.43, discount: 10%.
1234567854310📚 Common patterns
Why use this tool
Every keystroke in the pattern → matches re-highlight immediately. Fast visual feedback.
Cheatsheet includes VN phone pattern (+84/0xxxxx) — not every tool has this.
Test pattern + replacement string → preview output. Supports $1, $2 capture groups.
How to use
- 1Enter pattern (no / /) + flags (g/i/m/s).
- 2Paste test string into the textarea.
- 3Matches highlight automatically. Click cheatsheet items to load common patterns.
Regex tester
Native JavaScript RegExp follows the ECMAScript spec — close to Python/PCRE with minor differences (e.g., lookbehind support depends on the browser).
The tool uses RegExp.exec / String.matchAll for the global flag, showing each match with its index + capture groups.
- ✓Live realtime match highlight
- ✓Capture groups display ($1, $2…)
- ✓6 flags toggle (g/i/m/s/u/y)
- ✓Replace mode with preview
- ✓7 common patterns cheatsheet
- ✓VN-specific (phone +84)
- ✓100% native RegExp
FAQ
How is this different from regex101.com?
regex101 has pattern explain + multi-flavor (PCRE/Python/JS). This is simpler, loads fast, has VN patterns. Use it for daily testing.
Is lookbehind supported?
Yes, Chrome 62+ / Safari 16.4+. Newer Firefox required. '(?<=...)X' and '(?<!...)X' all work.
Pattern slow / hangs?
Possible catastrophic backtracking — patterns like (a+)+ on long input. The browser will throw a timeout. Avoid nested quantifiers.