Regex Tester — Test Regular Expressions Online | Tinker
← Tinker
/ /
Test String
Match Highlights

  

Common Regex Patterns

PatternMatchesExample match
\b[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}\bEmail addressuser@example.com
https?://[\w\-]+(\.[\w\-]+)+(/[\w\-./?%&=]*)?URL (http/https)https://tinker.bakemyweb.com
\b\d{1,3}(\.\d{1,3}){3}\bIPv4 address192.168.1.1
^\+?[1-9]\d{1,14}$E.164 phone number+14155552671
\d{4}-\d{2}-\d{2}ISO 8601 date2024-03-15
[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}UUID v4550e8400-e29b-41d4-a716-446655440000
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$Hex colour code#FF5733
^\d{5}(-\d{4})?$US ZIP code10001 or 10001-1234

Regex Syntax Quick Reference

TokenMeaning
.Any character except newline (use s flag to include newlines)
^ $Start / end of string (or line with m flag)
\bWord boundary — position between a word char and a non-word char
\d \w \sDigit [0-9] / word char [a-zA-Z0-9_] / whitespace
\D \W \SNegated versions of above
* + ?0 or more / 1 or more / 0 or 1 (greedy)
*? +?Lazy (non-greedy) versions — match as few chars as possible
{n} {n,m}Exactly n / between n and m repetitions
[abc] [^abc]Character class / negated class
(abc)Capturing group — accessible as $1, $2
(?:abc)Non-capturing group — groups without creating a backreference
(?<name>abc)Named capturing group — accessible as match.groups.name
a|bAlternation — match a or b

Flags

FlagEffect
gGlobal — find all matches, not just the first
iCase-insensitive — A matches a
mMultiline — ^ and $ match start/end of each line
sDotAll — . matches newlines too
uUnicode — enables full Unicode matching and disallows invalid escapes

© 2026, Tinker - tools · calculators · practice games