Common Expressions
^: Represents the beginning of a string
$: Indicates the end of a string
.: matches any single character except \ n
[]: Filtering of characters
[] The content in the [] can only appear in one
|: Meaning of "or"
(): Change operation priority and extraction Group
*: Qualifier, indicating that the preceding expression appears 0 or more times
+: Qualifier, expression of the preceding expression appears at least once (one or more times)
? : Qualifier, which indicates that the preceding expression must appear 0 or one time
{n}: Qualifier, indicating that the preceding expression must appear n times
{N,}: qualifier, indicating that the preceding expression appears at least n times
{n,m}: Qualifier, indicating that the preceding expression appears at least n times, at most, M-Times
\d: Equivalent to [0-9]
\d: Equivalent to [^0-9]
\s: Represents all whitespace, invisible characters
\s: denotes all characters except \s
\w: means [0-9a-za-z]
\w: represents all characters except \w
Common Functions
Regex.IsMatch (); Determine if the match
Regex.match (); Extract a match
Regex.Matches (); Extract all Matches
Regex.Split (); Segmentation
Regex.Replace (); Replace
---restore content ends---
Regular Expressions in C #