Slick V3.3 manual Brief Regular Expression Examples

Models: V3.3

1 568
Download 568 pages 2.03 Kb
Page 558
Image 558

 

Brief Regular Expressions

 

 

 

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-

 

 

 

 

536

Page 558
Image 558
Slick V3.3 manual Brief Regular Expression Examples