Regex Tester

Test and debug regular expressions with live match highlighting, capture groups and flags — plus a quick-reference cheatsheet.

Read the guide: How to Test and Debug a Regular Expression
//g

3 matches

Test string
Matches
Preview
Contact us:
alice@example.com and bob@dev.io
Support: help@codingeagles.dev
Match 1 · index 12
alice@example.com
$1
alice
$2
example.com
Match 2 · index 34
bob@dev.io
$1
bob
$2
dev.io
Match 3 · index 54
help@codingeagles.dev
$1
help
$2
codingeagles.dev
Regex cheatsheet
\dAny digit (0–9)
\wWord char (a–z, 0–9, _)
\sWhitespace
.Any char except newline
^Start of string / line
$End of string / line
*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m times
[abc]Any of a, b, c
[^abc]None of a, b, c
(…)Capture group
(?<name>…)Named capture group
(?:…)Non-capturing group
a|ba or b
\bWord boundary
(?=…)Lookahead
(?!…)Negative lookahead

How it works

  1. 1

    Write a pattern

    Enter a regex and toggle flags like g, i, m and s.

  2. 2

    Add test text

    Paste the text to search; matches highlight as you type.

  3. 3

    Inspect groups

    See every match with its captured groups and named captures.

Instant & 100% private — nothing is uploaded

Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.

Frequently asked questions

Which regex flavor does it use?
JavaScript’s native RegExp engine, so behavior matches exactly what runs in the browser and Node.js, including named groups and lookbehind in modern engines.
Does it show capture groups?
Yes. Each match lists numbered and named capture groups, so you can confirm your pattern extracts the right parts.
What do the flags mean?
g = all matches, i = case-insensitive, m = multiline anchors, s = dot matches newlines, u = unicode, y = sticky. The cheatsheet explains common tokens too.
Is my data sent to a server?
No. Everything runs locally in your browser using JavaScript and WebAssembly. Your input never leaves your device, nothing is uploaded, and nothing is logged or stored.