Regex Tester
Test regular expressions against text instantly in your browser with match highlighting and a flags menu. Free online regex tester — no data uploaded.
Enter the values below, then press Calculate (or press Enter). The calculator updates your results instantly. Try different values to see how your inputs change the outcome.
- Regular expression — enter a text value. A typical Regular expression would be /\b[A-Z]{3}\b/g or ^[a-z]+$.
- Test string — enter a value. A typical Test string would be Paste the text to test against here….
- Review your results — the key output is highlighted, with supporting figures below.
Loading calculator…
Results
| Detail | Value |
|---|---|
| Matches (up to 50) | |
| Valid regex | |
| Error |
What is this calculator for?
Test a regular expression against a sample string, show how many times it matches, and list the matched values.
How to Use This Calculator
Enter the values below, then press Calculate (or press Enter). The calculator updates your results instantly. Try different values to see how your inputs change the outcome.
- Regular expression — enter a text value. A typical Regular expression would be /\b[A-Z]{3}\b/g or ^[a-z]+$.
- Test string — enter a value. A typical Test string would be Paste the text to test against here….
- Review your results — the key output is highlighted, with supporting figures below.
What You'll Need
- Regular expression
- a text value · required
- Test string
- a value · required
About This Calculator
This regex tester runs your JavaScript-flavoured regular expression against a test string and reports every match.
Enter a pattern as /pattern/flags (slash-delimited with optional g, i, m, s, u, y flags) or a bare pattern. The tool uses global matching so it finds all occurrences, lists up to the first 50 matches, and validates the pattern — showing the parser error if it is malformed.
Testing runs entirely in your browser.