Regex Tester & Matcher

Evaluate regular expressions in real-time with instant match highlighting, capture group extraction, and flags controls.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.
/ / g
Flags:
Test String
0 lines · 0 charsPlain Text
Matches & Groups
0 matches
0 matchesParsed JSON

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.

Frequently Asked Questions

What regex engine does this use?
Your browser native JavaScript RegExp, so syntax and behavior match what runs in Node, Chrome, and Firefox.
Why is the Global (g) flag always applied?
The matcher forces g internally to collect every match in the text, even if you leave the checkbox unchecked. The other flags (i, m, s, u) behave exactly as toggled.
Are capture group values shown?
Only named groups ((?<name>...)) appear in the groups field of the output. Positional captures like ([a-z]+) are not listed separately: only the full match, its index, and its length.
Is there a limit on matches or runtime?
Matching stops after 5000 iterations or 1.5 seconds, whichever comes first, to prevent a catastrophic-backtracking pattern from freezing the tab.
Does anything leave my browser?
No. Matching runs entirely client-side: the pattern and test string are never sent anywhere.