Regex Tester
Test JavaScript regular expressions with live match highlighting and numbered capture groups.
Matches
Copied!
Matches will appear here.
Highlighted
Highlighted text will appear here.
How It Works
Type your regular expression in the pattern field and your test string below it. The tool applies the regex in real time using JavaScript's native RegExp engine, highlights every match in the text, and lists the captured groups for each match. Flags such as case-insensitive and global can be toggled with checkboxes.
Use Cases
- Prototyping input-validation patterns before adding them to code
- Extracting structured data — dates, emails, IDs — from raw text
- Learning regex syntax interactively with instant visual feedback
- Testing edge cases for log-parsing rules