DevTool Desk

Regex Tester

2 matches
Contact us at support@example.com or sales@example.org for help.

Capture groups

Match 1: support@example.com

  • Group 1: support
  • Group 2: example
  • Group 3: com

Match 2: sales@example.org

  • Group 1: sales
  • Group 2: example
  • Group 3: org

Cheat sheet

.Any character except newline
\dDigit (0-9)
\wWord character
\sWhitespace
\D \W \SNegated versions of above
^Start of string/line
$End of string/line
\bWord boundary
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Range from a to z
*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m times
(...)Capturing group
(?:...)Non-capturing group
(?<name>...)Named capturing group
a|ba or b
(?=...)Positive lookahead
(?!...)Negative lookahead

Test a regular expression against sample text with live match highlighting, a breakdown of capture groups for every match, and a built-in cheat sheet. Click 'Explain this regex' for a plain-English, token-by-token breakdown of what your pattern does.

Frequently asked questions

Does the language flavor selector change how matching works?

Matching always runs on JavaScript's built-in regex engine. The flavor selector is informational — Python and PCRE regex syntax is very similar to JavaScript's for most everyday patterns, but they differ in some specifics (like inline flags or certain lookbehind support) that aren't emulated here.

What do the named groups in the capture panel come from?

If your pattern uses named groups like (?<year>\d{4}), each match's group values appear by name in addition to the numbered groups.

How accurate is the 'Explain this regex' feature?

It walks through your pattern token by token and describes common constructs (character classes, quantifiers, groups, anchors, lookarounds). It's a helpful guide, not a full formal parser, so very unusual or deeply nested patterns may be described more generically.