Regex Tester
Test a regular expression against sample text and see matches highlighted.
Your file never leaves this browser tab — everything runs locally on your device.
How to use regex tester
- Enter a regular expression and any flags (e.g. gi).
- Paste or type your sample text.
- Matches highlight instantly, with a list showing each match's position and capture groups.
Common use cases
- Building and debugging a validation pattern (email, phone number, etc.) before using it in code.
- Checking whether a regex correctly matches all the cases in a block of sample text.
- Learning regex syntax by experimenting and seeing immediate results.