Regex Tester
Test a regular expression against sample text and see every match.
Quick answer: enter your details below and click Test regex — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
R
Developer
Enter your details below.
How to use
- Type your pattern without surrounding slashes.
- Add flags such as g for all matches or i to ignore case.
- Paste test text, click Test regex, and review the match list.
About this tool
Regular expressions describe text patterns, and small mistakes in them are easy to miss. This tool runs your pattern with your chosen flags against your test text and lists each match, capped at 100 results. Invalid patterns are reported with the browser's error message instead of failing silently.
Frequently asked questions
Why do I see no matches?
Check the pattern, the flags and the test text: a missing flag such as g only affects how many matches are listed, while a wrong character class can stop matching entirely.
What does an invalid pattern error mean?
The pattern could not be compiled, usually because of an unbalanced bracket, parenthesis or a bad escape; the message names the problem.