Regex Cheatsheet & Live Tester

Developer Utilities

Comprehensive regular expression (RegEx) reference cheatsheet with common patterns and a live testing sandbox.

Live Regex Tester

Matched (1)
/
/

Ready & Popular Regex Patterns

Email Address

Validates standard email formatting.

^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

URL / Web Address

URLs starting with http/https protocols.

https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)

IPv4 Address

Valid IPv4 addresses between 0.0.0.0 and 255.255.255.255.

^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

Hex Color Code

3 or 6 digit hex color codes like #FFF or #FFFFFF.

^#(?:[0-9a-fA-F]{3}){1,2}$

URL Slug Format

SEO-friendly slug with lowercase letters, digits, and hyphens.

^[a-z0-9]+(?:-[a-z0-9]+)*$

Strong Password

Min 8 chars: 1 uppercase, 1 lowercase, 1 digit, and 1 special char.

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
TokenDescriptionExampleCopy
.Any single character except newlinea.c -> abc, a1c
\dAny digit [0-9]\d+ -> 42, 1984
\DAny non-digit character\D+ -> hello
\wWord character (alphanumeric + underscore)\w+ -> user_12
\WNon-word character\W -> @, #, !
\sWhitespace character\s+ -> " "
\SNon-whitespace character\S+ -> word
\tTab character\t
\nNewline character\n
[abc]Any character enclosed in brackets[aeiou] -> sesli harfler
[^abc]Any character NOT enclosed in brackets[^0-9] -> rakam harici
[a-z]Character range lowercase a to z[a-z]+ -> kod
[A-Z]Character range uppercase A to Z[A-Z]+ -> TURK
[0-9]Digit range 0 to 9[0-9]{4} -> 2026
*0 or more matchesa* -> "", "a", "aaa"
+1 or more matchesa+ -> "a", "aaa"
?0 or 1 match (optional)colou?r -> color, colour
{n}Exactly n matches\d{4} -> 2026
{n,}At least n matches\d{3,} -> 100, 10000
{n,m}Between n and m matches\d{2,4} -> 99, 9999
*? / +?Lazy / non-greedy match<.*?> -> ilk kapanışa kadar
^Start of string or line^https -> https ile başlayan
$End of string or line\.json$ -> .json ile biten
\bWord boundary\bcat\b -> "cat" ("catch" değil)
\BNon-word boundary\Bcat -> "scatter"
(abc)Capturing group(\d{2})-(\d{2}) -> $1, $2
(?:abc)Non-capturing group(?:https?|ftp)://
a|bAlternation (OR operator)kırmızı|mavi
(?=abc)Positive lookahead\d+(?=px) -> 100 (100px içindeki)
(?!abc)Negative lookahead\d+(?!px) -> px olmayan sayılar
(?<=abc)Positive lookbehind(?<=\$)\d+ -> $ sonrasındaki rakam
(?<!abc)Negative lookbehind(?<!\$)\d+ -> $ olmayan rakam
Independent Project Patronage

Love ToolsApp? Buy Us a Coffee

ToolsApp operates 100% client-side with zero subscriptions and zero data tracking. We believe essential digital tools should remain free and accessible to everyone. Your coffee donations help us keep servers running and build new tools!

100% Client-SideFree For Everyone

How to Use Regex Cheatsheet & Live Tester

1

Search Rules

Filter regex tokens by category or search term.

2

Test Live

Use the live tester on top to test regex patterns against sample text.

3

Copy Pattern

Copy syntax rules or common patterns directly to your clipboard.

Privacy Guarantee:All computations, transformations, and file processing occur 100% locally in your browser via client-side JavaScript. Your sensitive data is never uploaded or logged on any remote server.

User Reviews & Feedback

Share your experience anonymously. Moderated automatically by AI.

5.0
0 reviews
5 / 5
0/500
Powered by Groq AI automated content moderation

Approved Reviews (0)

Loading reviews...