Regex Tester & Matcher
Evaluate regular expressions in real-time with instant match highlighting, capture group extraction, and flags controls.
JavaScript RegExp Syntax Reference
| Token | Construct | Matches |
|---|---|---|
\d / \D | Character class | Any ASCII digit [0-9] / any non-digit character |
\w / \W | Word character | Alphanumeric or underscore [A-Za-z0-9_] / non-word character |
\b | Word boundary | Zero-width transition between a \w and a \W character (or start/end of string) |
(?<name>...) | Named capture group | Captures subpattern into match.groups.name |
(?:...) | Non-capturing group | Groups tokens for quantifiers or alternation without allocating a capture index |
(?=...) / (?!...) | Positive / negative lookahead | Asserts that what follows the current position matches (or does not match) without consuming characters |
(?<=...) / (?<!...) | Positive / negative lookbehind | Asserts that what precedes the current position matches (or does not match) |
About This Tool
Regex Tester runs a pattern against a test string using the browser native RegExp engine and re-evaluates on every keystroke: no separate "run" step for routine checking. Results come back as structured JSON: each match text, index, length, and named capture groups.
It evaluates pattern matching interactively: grab the JSON output to process matched groups in your own code or tests.
Key Features
- Five flag toggles: Case-insensitive (i), multiline (m), dotAll (s), and unicode (u), on top of the global (g) flag.
- Live re-matching: Output updates immediately as pattern, test string, or flags change.
- Structured JSON output: Match text, index, length, and named groups for every hit, ready to copy.
- Match count badge: A running total of matches displayed dynamically in the toolbar.
- Sample pattern & text: One-click load for a working email pattern against sample text.
- Copy output: One-click copy provides the entire JSON payload to clipboard.