Bỏ qua đến nội dung chính
FreeOnlineTools Go
Tiếng Việt

Tham chiếu

Trang tham chiếu nhanh biểu thức chính quy

Tham chiếu nhanh cú pháp biểu thức chính quy bao gồm ký tự, lượng từ, neo, nhóm và mẫu phổ biến.

Last updated: 2026-08-27

syntaxcategorydescription
.CharactersAny character except newline
\dCharactersAny digit (0-9)
\DCharactersAny non-digit
\wCharactersAny word character (a-z, A-Z, 0-9, _)
\WCharactersAny non-word character
\sCharactersAny whitespace (space, tab, newline)
\SCharactersAny non-whitespace
\bCharactersWord boundary
\BCharactersNon-word boundary
[abc]CharactersAny of a, b, or c
[^abc]CharactersNone of a, b, or c
[a-z]CharactersAny lowercase letter
[a-zA-Z]CharactersAny letter
*Quantifiers0 or more occurrences
+Quantifiers1 or more occurrences
?Quantifiers0 or 1 occurrence (optional)
{n}QuantifiersExactly n occurrences
{n,}QuantifiersAt least n occurrences
{n,m}QuantifiersBetween n and m occurrences
^AnchorsStart of string
$AnchorsEnd of string
\AAnchorsStart of string (absolute)
\ZAnchorsEnd of string (absolute)
(...)GroupsCapture group
(?:...)GroupsNon-capturing group
(?=...)GroupsPositive lookahead
(?!...)GroupsNegative lookahead
(?<=...)GroupsPositive lookbehind
(?<!...)GroupsNegative lookbehind
(?P<name>...)GroupsNamed capture group
|AlternationOR —match either side
\EscapingEscape special character
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$Common PatternsEmail address
^(https?:\/\/)?[\w.-]+\.[a-zA-Z]{2,}.*$Common PatternsURL
^\d{4}-\d{2}-\d{2}$Common PatternsDate (YYYY-MM-DD)
^\d{3}-\d{3}-\d{4}$Common PatternsUS phone number
^\d{16}$Common PatternsCredit card number (16 digits)
^[A-Z]{2}\d{2}[A-Z0-9]{1,30}$Common PatternsIBAN (simplified)
^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$Common PatternsHex color
^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$Common PatternsIPv4 address
^[a-z0-9-]+$Common PatternsSlug (kebab-case)
iFlagsCase-insensitive matching
gFlagsGlobal matching (find all)
mFlagsMultiline mode (^ and $ match line boundaries)
sFlagsDot matches newline
uFlagsUnicode mode
yFlagsSticky matching

Related Tools