Test regular expressions
Paste a pattern, set flags, and match against a test string in your browser. Highlights and capture groups. No upload. No account.
- JavaScript RegExp
- Match highlighting
- Runs in your browser
- Nothing uploaded
- No account
Ready. Edit the pattern or test string — matching updates as you type.
Matches
What this tool does
This regex tester runs your pattern with JavaScript’s RegExp against the test string locally. Use it to debug email, URL, or token patterns, check flags, and inspect capture groups before you paste the expression into code. Prefer a browser-only tester when the sample text should not leave your machine.
Related tools
FAQ
What is a regex tester?
A regex tester lets you try a regular expression pattern against sample text and see matches, capture groups, and flag effects immediately. This page runs JavaScript RegExp in your browser so you can debug patterns without sending data to a server.
Does this regex tester upload my pattern or test string?
No. Matching runs entirely in your browser with the built-in RegExp engine. Nothing is uploaded, logged, or stored on a server.
Which regex flags does this tool support?
It supports the common JavaScript flags: g (global), i (ignore case), m (multiline), s (dotAll), u (Unicode), and y (sticky). Enable them with the checkboxes next to the pattern.
Why is my regular expression invalid?
JavaScript throws a SyntaxError for unbalanced brackets, invalid escape sequences, or unsupported constructs. Fix the pattern until the status line shows a match count instead of an error. This tester uses JavaScript regex syntax, which differs slightly from PCRE or Python.
How do capture groups appear in the results?
Each match lists the full match text plus numbered groups (and named groups when your pattern uses (?<name>…)). Empty optional groups show as (empty).