Brief regular expression examples – Slick EDIT V3.3 User Manual

Page 558

Advertising
background image

Brief Regular Expression

Definition

char

. The predefined expressions are:

\:a [A-Za-z0-9 - Matches an alphanumeric char-

acter.

\:b\([ \t]#\) - Matches blanks.

\:c [A-Za-z] - Matches an alphabetic character.

\:d [0-9] - Matches a digit.

\:f \([~\[\]\:\\/<>|=+;, \t"’]#\) - Matches a file name

part.

\:f \([~/ \t"’]#\) - UNIX: Matches a file name part.

\:h\([0-9A-Fa-f]#\) - Matches a hex number.

\:i\([0-9]#\) - Matches an integer.

\:n\([0-9]#\(.[0-9]#|\)|.[0-9]#\)\([Ee]\(\+|-|\)[0-9]#|\)

\) - Matches a floating number.

\:p\(\([A-Za-z]\:|\)\(\\|/|\)\(:f\(\\|/\)\)@:f\) - Windows:

Matches a path.

\:p\(\(/|\)\(:f\(/\)\)@:f\) - UNIX: Matches a path.

\:q\(\"[~\"]@\"|'[~']@'\) - Matches a quoted string.

\:v\ ([A-Za-z_$][A-Za-z0-9_$]@\) - Matches a C

variable.

\:w\ ([A-Za-z]#\) - Matches a word.

Brief Regular Expression Examples

The table below shows example of Brief regular expressions.

Table 11.17. Brief Regular Expression Examples

Sample Brief Regular Expression

Description

<defproc

Matches lines that begin with the word defproc.

<definit>

Matches lines that only contain the word definit.

<\*name

Matches lines that begin with the string *name. No-

Brief Regular Expressions

536

Advertising