Regex Tester
Live regex testing with match highlighting. See matches, groups, and counts instantly.
Related Guide
Free Regex Tester Online: Test, Debug, and Learn Regular Expressions
About This Tool
Free regex tester online — write and test JavaScript regular expressions with live match highlighting, group capture display, and full flag support (g, i, m, s, u). Your matches update as you type — no button press needed. Regular expressions (regex) are patterns used to search, extract, validate, and replace text. Developers use regex for form validation (email, phone, postal code patterns), log file parsing, find-and-replace in code editors, URL routing rules, and data extraction from API responses. This interactive regex tester shows every match highlighted in your test string, displays named and numbered capture groups, and lets you experiment with different flags to see their effect immediately. Much faster than a trial-and-error cycle in your code editor.
How to Use
- 1
Enter your regex pattern
Type your regular expression in the pattern field (without the surrounding /slashes/).
- 2
Set flags
Toggle flags: g (find all matches), i (case-insensitive), m (multiline), s (dotAll).
- 3
Enter test text
Paste or type the string you want to test against.
- 4
See live matches
Matches are highlighted in the test string in real time. Capture groups are listed below.