This section describes the regular expression syntax that can be used in the Find dialog box.

Pattern Matches

Pattern Description
. Any one character except newline character.
[abc] a, b or c.
[a-z] Any character a to z inclusive.
[^ac] Any character except a and c.
(x) x, where x might be any regular expression.
x* Zero or more occurrences of x, where x may be any regular expression.
x+ One or more occurrences of x, where x may be any regular expression.
x{n,m} Between n and m occurrences of x, where x may be any regular expression.
x{n} n occurrences of x, where x may be any regular expression.
x{n,} n or more occurrences of x, where x may be any regular expression.
x|y x or y, where x and y may be any regular expression.
xy xy, where x and y may be any regular expression.
^ Beginning of a line.
\A Beginning of a line.
$ End of a line.
\z End of a line.
\Z End of a line.
\< Beginning of a word.
\b Beginning of a word.
\> End of a word.
\B End of a word.

The shorthand of character classes

Class Description
\w word
\W Not word
\s whitespace
\S Not whitespace
\d Digit
\D Not digit

POSIX character classes

Class Description
[:alnum:] Alphanumeric. same to the [a-zA-Z0-9].
[:alpha:] Alphabetic. same to the [a-zA-Z].
[:blank:] Spaces or tabs.
[:cntrl:] Any control characters.
[:digit:] Numeric digits. same to the [0-9].
[:graph:] Any visible characters. (no whitespace)
[:lower:] Lower-case alphabetic. same to the [a-z].
[:print:] Non-control characters.
[:punct:] Punctuation characters.
[:space:] Whitespace.
[:upper:] Upper-case alphabetic. same to the [A-Z].
[:xdigit:] Hex digits. same to the [0-9a-fA-F].

Examples

Expression Description
[0-9]+ One or more numeric characters.
(foo)|(bar) Either "foo" or "bar".
\.html$ Any string ending in ".html".
^\. Any string starting with a period.