\ |
Escape characters, escaping special characters, ignoring their special meanings |
A\. b matches a.b, but does not match AJB, point is escaped as a special meaning |
\ |
\ |
\ |
\ |
^ |
Matches the beginning of the line, awk, ^ is the start of the string |
^tux matches lines starting with Tux |
^ |
^ |
^ |
^ |
$ |
Matches the end of the line, in Awk, $ is the ending of the matching string |
tux$ matches lines ending with Tux |
$ |
$ |
$ |
$ |
. |
Matches any single character except the line break \ n, in awk you can |
AB. Match ABC or ABD, not matching ABCD or Abde, only match single character |
. |
. |
. |
. |
[] |
Match any one of the characters contained in [character] |
COO[KL] can match cook or cool |
[] |
[] |
[] |
[] |
[^] |
Match any character other than [^ character] |
123[^45] can not match 1234 or 1235,1236/1237 |
[^] |
[^] |
[^] |
[^] |
[-] |
Matches any one of the specified Fan Wenne characters in [], to be written as incrementing |
[0-9] can match 1, 2, or 3 of any one of the numbers |
[-] |
[-] |
[-] |
[-] |
? |
Match previous items 1 or 0 times |
Colou?r can match color or colour, and cannot match Colouur |
Not supported |
? |
? |
? |
+ |
Match the previous item 1 or more times |
sa-6+ matches sa-6, sa-666, cannot match sa- |
Not supported |
+ |
+ |
+ |
* |
Match the previous item 0 or more times |
Co*l matches cl, col, cool, coool, etc. |
* |
* |
* |
* |
() |
Match expression to create a substring for matching * * * * * |
Max (tri)? Match Max or Maxtri |
Not supported |
() |
() |
() |
N |
Matches the previous item n times, n is a positive integer that can be 0 |
[0-9] {3} matches any three-digit number and can be expanded to 3 [0-9] |
Not supported |
N |
N |
N |
{N,} |
The previous item must match at least n times |
[0-9] {2,} matches any one two-digit or multiple-digit number |
Not supported |
{N,} |
{N,} |
{N,} |
{N,m} |
Specifies that the preceding item matches at least N times, up to M times, n<m |
[0-9] {2,5} matches any number from a two-digit to a five-digit number |
Not supported |
{N,m} |
{N,m} |
{N,m} |
| |
Alternate Match | Any one of two sides |
AB (C|D) matches ABC or ABD |
Not supported |
| |
| |
| |