Common Regular Expression operators:
| Operator |
Purpose |
.Full stop) |
Match any single character. |
^Remove font size) |
Match an empty string that appears at the beginning of the row or the start of the string. |
$Dollar sign) |
Match the null string at the end of the row. |
A |
Match uppercase lettersA. |
a |
Match lowercase lettersA. |
\d |
Match any digit. |
\D |
Match any single non-numeric character. |
\w |
Matches any single letter or number character. Its synonym is[:alnum:]. |
[A-E] |
Match any uppercaseA, B, C, DOrE. |
[^A-E] |
MatchDivision A, B, C, DAndEAny character other. |
X? |
Matches zero or one uppercase letterX. |
X* |
Match zero or any uppercase lettersX. |
X+ |
Match one or more lettersX. |
X{n} |
Exact matchNLetter (s)X. |
X{n,m} |
Least matchedNAnd cannot exceedMLetter (s)X. If omittedM, The expression will try to match at leastN X. |
(abc|def)+ |
Matching a series of at least one)abcOrdef;abcAnddefWill match. |
Related Articles]
- Understanding Regular Expressions
- Introduction to regular expression syntax in UNIX and Linux Shell