A.1 Regular-Expression Summaries

The following table summarizes PWB's UNIX regular-expression syntax.

Table A.1 UNIX Regular-Expression Summary

Syntax Description

\c Escape: literal character c
. Wildcard: any character
^ Beginning of line
$ End of line
[class] Character class: any one character in set
[^class] Inverse class: any one character not in set
x* Repeat: zero or more occurrences of x
x+ Repeat: one or more occurrences of x
\{x\} Grouping: group subexpression for repetition
\{x\!y\!z\} Alternation: match one from the set
\~x “Not”: fail if x at this point
\(x\) Tagged expression
\n Reference to tagged expression number n
\:e Predefined expression

The following table summarizes the UNIX predefined expressions.

Table A.2 UNIX Predefined Expressions

Syntax Description

\:a Alphanumeric character
\:b White space
\:c Alphabetic character
\:d Digit
\:f Part of a filename
\:h Hexadecimal number
\:i Microsoft C/C++ identifier
\:n Unsigned number
\:p Path
\:q Quoted string
\:w English word
\:z Unsigned integer

CodeView uses a subset of the UNIX regular-expression syntax. You can use regular expressions as arguments to the Search (/) command and Examine Symbols (X) command. The following table summarizes CodeView regular expressions.

Table A.3 CodeView Regular Expressions

Character Syntax Meaning

Backslash \c Matches a literal character c. (Escape)
Period . Matches any single character. (Wildcard)
Caret ^ Matches the beginning of a line. The caret must appear at the beginning of the pattern.
Dollar sign $ Matches the end of a line. The dollar sign must appear at the end of the pattern.
Asterisk c* Matches zero or more occurrences of c.
Brackets [...] Matches any one character in the set of the characters within the brackets.

Within the brackets, you can specify a negated set and ranges of characters by using the following notation:

Character Syntax Meaning

Dash Specifies a range of characters in the ASCII order between the characters on either side, inclusive. For example, [a-z] matches the lowercase alphabet.
Caret ^ Matches any one character not within the brackets. The caret must be the first character within the brackets. For example, [^0-9] matches any character except a digit.

The following table summarizes the non-UNIX regular-expression syntax.

Table A.4 Non-UNIX Regular-Expression Summary

Syntax Description

\c Escape: literal character c
? Wildcard: any character
^ Beginning of line
$ End of line
[class] Character class: any one character in set
[~class] Inverse class: any one character not in set
x* Repeat: zero or more occurrences of x
x+ Repeat: one or more occurrences of x
x@ Repeat: maximal zero or more occurrences of x
x# Repeat: maximal one or more occurrences of x
(x) Grouping: group subexpression for repetition
(x!y!z) Alternation: match one from the set
~x “Not”: fail if x at this point
x^n “Power”: match n copies of x
{x} Tagged expression
$n Reference to tagged expression number n
:e Predefined expression

The following table summarizes the non-UNIX predefined expressions.

Table A.5 Non-UNIX Predefined Expressions

Syntax Description

:a Alphanumeric character
:b White space
:c Alphabetic character
:d Digit
:f Part of a filename
:h Hexadecimal number
:i Microsoft C/C++ identifier
:n Unsigned number
:p Path
:q Quoted string
:w English word
:z Unsigned integer