Regex tester
Test regular expressions with live highlighting, flags and capture groups. Runs in your browser.
Runs 100% in your browser / /
Matches
How to test a regular expression
- Enter a pattern. Type your regex and toggle the flags you need.
- Add test text. Paste the string to match against; matches highlight live.
- Inspect matches. Review the match list and capture groups below.
About regular expressions
Regular expressions are a compact language for matching patterns in text — validating emails, extracting fields from logs, find-and-replace across a codebase. They're famously fiddly, so a live tester that highlights matches and breaks out capture groups as you type saves a lot of trial and error. This uses your browser's own JavaScript regex engine, so what works here works in your JS code.
Frequently asked questions
- JavaScript (ECMAScript) regular expressions — the same engine as Node and browsers. Most PCRE patterns work, but some constructs (e.g. recursion, certain lookbehinds in old browsers) differ.
- g (global), i (ignore case), m (multiline), s (dotAll), u (unicode) and y (sticky). Toggle them next to the pattern.
- Yes — each match lists its numbered and named capture groups, and matches are highlighted in the test string.
- No — matching runs entirely in your browser.