Table 1-36 through Table 1-40 list the metacharacters and metasequences supported by vi. For expanded definitions of each metacharacter, see Section 1.2.1.
Class |
Meaning |
|
Any character listed or contained within a listed range. |
|
Any character that is not listed or contained within a listed range. |
|
POSIX-style character class valid only within a character class. |
. |
Any character except newline (unless |
Vim only | |
|
Word character, |
|
Non-word character, |
|
Letter character, |
|
Non-letter character, |
|
Head of word character, |
|
Not the head of a word character, |
|
Digit character, |
|
Non-digit character, |
|
Whitespace character, |
|
Non-whitespace character, |
|
Hex digit, |
|
Non-hex digit, |
|
Octal digit, |
|
Non-octal digit, |
|
Lowercase letter, |
|
Non-lowercase letter, |
|
Uppercase letter, |
|
Non-uppercase letter, |
|
Identifier character defined by |
|
Any non-digit identifier character. |
|
Keyword character defined by |
|
Any non-digit keyword character. |
|
Filename character defined by |
|
Any non-digit filename character. |
|
Printable character defined by |
|
Any non-digit printable character. |
Sequence |
Meaning |
|
Start of a line when appearing first in a regular expression; otherwise, it matches itself. |
|
End of a line when appearing last in a regular expression; otherwise, it matches itself. |
|
Beginning of word boundary, (i.e., a position between a punctuation or space character and a word character). |
|
End of word boundary. |
Modifier |
Meaning |
|
Turns on case-insensitive mode for all searching and substitution. |
|
Turns off case-insensitive mode. |
|
Force next character in a replacement string to uppercase. |
|
Force next character in a replacement string to lowercase. |
|
Force all following characters in a replacement string to uppercase. |
|
Force all following characters in a replacement string to lowercase. |
|
Ends a span started with |
Sequence |
Meaning |
|
Group subpattern and capture submatch into
|
|
Contains the results of the |
|
Evaluates to the matched text when used in a replacement string. |
|
Match 0 or more times. |
Vim only | |
|
Match 1 or more times. |
|
Match 1 or 0 times. |
|
Match exactly |
|
Match at least |
|
Match at most |
|
Match at least |
18.117.186.92