Symbol
|
Description
|
Example
|
^
|
Match at the beginning of a line only.
|
^word
Finds lines with w in the first column.
|
$
|
Match at end of a line only.
|
word$
Finds lines that end with “word” (no white space follows word).
|
\<
|
Match at beginning of word only.
|
\<word
Finds wordless and wordly but not fullword or awordinthemiddle.
|
\>
|
Match at end of word only.
|
\<word
Finds keyword and sword but not wordless or awordinthemiddle.
|
.
|
A period matches any single character.
|
w.rd
Finds lines containing word, ward, w3rd, torward, and so on, anywhere on the line.
|
*
|
Asterisk matches zero or more occurrences of the previous character or expression.
|
word*
Finds word, wor, work, and so on.
|
+
|
Match one or more occurrences of the previous character or expression.
|
wor+d
Finds word, worrd, worrrd, and so on.
|
?
|
Match zero or one occurrences of the previous character or expression.
|
wor?d
Finds word and wod.
|
[ ]
|
Match any one of the characters in brackets but no others.
|
[AZ ]
Finds any line that contains A or Z.
[Kk][eE][Nn]
Finds any variation of case when spelling "Ken" or "KEn" or "keN".
|
[^ ]
|
Match any character except those inside the brackets.
|
[^AZ ]
Finds any line that does not contain the letters A or Z.
|
[ - ]
|
Match a range of characters.
|
[A..Z]
Finds any line containing letters A through Z on them but not lower case letters
|
|
|
A vertical bar acts as an OR to combine two alternatives into a single expression.
|
word | let+er
Finds word, leter, letter, lettter, and so on.
|
\
|
Make a regular-expression symbol a literal character.
|
\*/$
Allows searching for *. This example finds all lines ending in */
|