About Regex Tester
Test and debug regular expressions in real time on XMOOO Tools with live match highlighting, capture group inspection, flag toggles (`g`, `i`, `m`, `s`, `u`), and visual regex syntax diagrams—all 100% locally in your browser.
How to Use Regex Tester
- Type your regular expression pattern into the regex input box and toggle flags like g (global) or i (case-insensitive).
- Paste your sample text below to see matching substrings and numbered/named capture groups immediately.
- Refine your pattern using our companion Regex Cheatsheet without leaving the site.
Useful Regular Expression Patterns
| Use Case | Regex Pattern | Notes |
|---|---|---|
| Email (Basic) | ^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$ | Standard email format check |
| ISO Date (YYYY-MM-DD) | ^\d{4}-\d{2}-\d{2}$ | Matches 2026-12-02 |
| Hex Color Code | ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ | Matches #fff or #18a058 |
| Digits Only | ^\d+$ | Positive integer strings |