November 2018
Beginner
330 pages
7h 21m
English
Each character (be it a literal or a special character) or a range of characters is followed by a quantifier, or a multi in Vim terms.
For example, \w\+ will match one or more word characters, and a\{2,4} will match two to four a characters in succession (such as aaa, for example).
Here is the list of most common quantifiers:
|
Symbol |
Meaning |
|
* |
0 or more, greedy |
|
\+ |
1 or more, greedy |
|
\{-} |
0 or more, non-greedy |
|
\? or \= |
0 or 1, greedy |
|
\{n,m} |
n to m, greedy |
|
\{-n,m} |
n to m, non-greedy |
You may have encountered two new terms in the table given: greedy and non-greedy. Greedy search refers to trying to match as many characters ...