Did you find this tool helpful?

Regex Tester & Explainer

Write a pattern, test it live, and get a plain-English breakdown of every token. Free, instant, runs in your browser.

/ /
Test String
Matches
Enter a pattern and test string to see matches
Pattern Explained
Enter a pattern above to see a plain-English breakdown of every token.
Regex Cheat Sheet

Character Classes

\dAny digit (0–9)
\DAny non-digit
\wWord char (a-z, A-Z, 0-9, _)
\WNon-word character
\sWhitespace (space, tab, newline)
\SNon-whitespace
[abc]Any of a, b or c
[^abc]Not a, b or c
[a-z]Character in range a–z
.Any char except newline

Quantifiers

*0 or more (greedy)
+1 or more (greedy)
?0 or 1 (optional)
*?0 or more (lazy)
+?1 or more (lazy)
{3}Exactly 3 times
{3,}3 or more times
{3,6}Between 3 and 6 times

Anchors & Boundaries

^Start of string / line
$End of string / line
\bWord boundary
\BNon-word boundary

Groups

(abc)Capturing group
(?:abc)Non-capturing group
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?Negative lookbehind
a|ba or b (alternation)

Escape Sequences

\nNewline
\tTab character
\rCarriage return
\\Literal backslash
\.Literal dot

Common Patterns

[\w.-]+@[\w.-]+\.\w{2,}Email
https?://[^\s]+URL
#[0-9a-fA-F]{3,6}Hex color
\d{4}-\d{2}-\d{2}Date YYYY-MM-DD
[6-9]\d{9}Indian mobile number

Share Feedback

We read every message ✌️