non-digit: [^0-9]
|/\x| \x \x hex digit: [0-9A-Fa-f]
|/\X| \X \X non-hex digit: [^0-9A-Fa-f]
|/\o| \o \o octal digit: [0-7]
|/\O| \O \O non-octal digit: [^0-7]
|/\w| \w \w word character: [0-9A-Za-z_]
|/\W| \W \W non-word character: [^0-9A-Za-z_]
|/\h| \h \h head of word character: [A-Za-z_]
|/\H| \H \H non-head of word character: [^A-Za-z_]
|/\a| \a \a alphabetic character: [A-Za-z]
|/\A| \A \A non-alphabetic character: [^A-Za-z]
|/\l| \l \l lowercase character: [a-z]
|/\L| \L \L non-lowercase character: [^a-z]
|/\u| \u \u uppercase character: [A-Z]
|/\U| \U \U non-uppercase character [^A-Z]
|/\_| \_x \_x where x is any of the characters above: character
class with end-of-line included
(end of character classes)
magic nomagic matches ~
|/\e| \e \e <Esc>
|/\t| \t \t <Tab>
|/\r| \r \r <CR>
|/\b| \b \b <BS>
|/\n| \n \n end-of-line
|/~| ~ \~ last given substitute string
|/\1| \1 \1 same string as matched by first \(\)
|/\2| \2 \2 Like "\1", but uses second \(\)
...
|/\9| \9 \9 Like "\1", but uses ninth \(\)
*E68*
|/\z1| \z1 \z1 only for syntax highlighting, see |:syn-ext-match|
...
|/\z1| \z9 \z9 only for syntax highlighting, see |:syn-ext-match|
x x a character with no special meaning matches itself
|/[]| [] \[] any character specified inside the []
|/\%[]| \%[] \%[] a sequence of optionally matched atoms
|/\c| \c \c ignore case, do not use the 'ignorecase' option
|/\C| \C \C match case, do not use the 'ignorecase' option
|/\Z| \Z \Z ignore differences in Unicode "combining characters".
Useful when searching voweled Hebrew or Arabic text.
magic nomagic matches ~
|/\m| \m \m 'magic' on for the following chars in the pattern
|/\M| \M \M 'magic' off for the following chars in the pattern
|/\v| \v \v the following chars in the pattern are "very magic"
|/\V| \V \V the following chars in the pattern are "very nomagic"
|/\%#=| \%#=1 \%#=1 select regexp engine |/zero-width|
|/\%d| \%d \%d match specified decimal character (eg \%d123)
|/\%x| \%x \%x match specified hex character (eg \%x2a)
|/\%o| \%o \%o match specified octal character (eg \%o040)
|/\%u| \%u \%u match specified multibyte character (eg \%u20ac)
|/\%U| \%U \%U match specified large multibyte character (eg
\%U12345678)
|/\%C| \%C \%C match any composing characters
Example matches ~
\<\I\i* or
\<\h\w*
\<[a-zA-Z_][a-zA-Z0-9_]*
An identifier (e.g., in a C program).
\(\.$\|\. \) A period followed by <EOL> or a space.
[.!?][])"']*\($\|[ ]\) A search pattern that finds the end of a sentence,
with almost the same definition as the ")" command.
cat\Z Both "cat" and "càt" ("a" followed by 0x0300)
Does not match "càt" (character 0x00e0), even
though it may look the same.
==============================================================================
5. Multi items *pattern-multi-items*
An atom can be followed by an indication of how many times the atom can be
matched and in what way. This is called a multi. See |/multi| for an
overview.
*/star* */\star*
* (use \* when 'magic' is not set)
Matches 0 or more of the preceding atom, as many as possible.
Example 'nomagic' matches ~
a* a\* "", "a", "aa", "aaa", etc.
.* \.\* anything, also an empty string, no end-of-line
\_.* \_.\* everything up to the end of the buffer
\_.*END \_.\*END everything up to and including the last "END"
in the buffer
Exception: When "*" is used at the start of the pattern or just after
"^" it matches the star character.
Be aware that repeating "\_." can match a lot of text and take a long
time. For example, "\_.*END" matches all text from the current
position to the last occurrence of "END" in the file. Since the "*"
will match as many as possible, this first skips over all lines until
the end of the file and then tries matching "END", backing up one
character at a time.
*/\+*
\+ Matches 1 or more of the preceding atom, as many as possible.
Example matches ~