Regex Tester
Test and debug regular expressions with real-time highlighting
//
How to use Regex Tester
- ① Enter your regular expression in the pattern field above.
- ② Enter one or more test strings below — one per line.
- ③ Matched lines are highlighted in yellow with a icon. Non-matching lines show a icon.
- ④ Toggle flags using the buttons on the right — hover each button for a full explanation and example.
- ⑤ Use the m flag if your pattern uses
^or$anchors to match start/end of each line.
Example — email validation:
Pattern: ^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$
johndoe@yahoo.com matched
hello@abc.com matched
john.doe no match
janedoe$gmail.com no match
How to use Regex Tester
Free online regex tester. Enter a pattern and test string to see matches highlighted in real time. Supports all JavaScript regex flags: g, i, m, s.
Frequently asked questions
This tester uses JavaScript (browser) regex. It is compatible with TypeScript, Node.js, and most modern languages for common patterns.