← Back to home

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.

LiveGroupsReplaceCheatsheet
Matches: 6
Order #1234, total: $56.78, tax: $5.43, discount: 10%.
[1] @7: 1234
[2] @21: 56
[3] @24: 78
[4] @34: 5
[5] @36: 43
[6] @50: 10
📚 Common patterns

Why use this tool

🎯
Live highlight

Every keystroke in the pattern → matches re-highlight immediately. Fast visual feedback.

📚
VN-specific patterns

Cheatsheet includes VN phone pattern (+84/0xxxxx) — not every tool has this.

🔁
Replace mode

Test pattern + replacement string → preview output. Supports $1, $2 capture groups.

How to use

  1. 1Enter pattern (no / /) + flags (g/i/m/s).
  2. 2Paste test string into the textarea.
  3. 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.