Testing and Maintaining Web Pages
115
The following table shows supported POSIX character classes:
Multicharacter regular expressions
You can use the following rules to build multicharacter regular expressions:
•
Parentheses group parts of regular expressions together into grouped
subexpressions that can be treated as a single unit. For example, (ha)+ matches
one or more instances of "ha".
•
A one-character regular expression or grouped subexpressions followed by an
asterisk (*) matches zero or more occurrences of the regular expression. For
example, [a-z]* matches zero or more lowercase characters.
•
A one-character regular expression or grouped subexpressions followed by a
plus (+) matches one or more occurrences of the regular expression. For
example, [a-z]+ matches one or more lowercase characters.
•
A one-character regular expression or grouped subexpressions followed by a
question mark (?) matches zero or one occurrences of the regular expression.
For example, xy?z matches either "xyz" or "xz".
•
The concatenation of regular expressions creates a regular expression that
matches the corresponding concatenation of strings. For example, [A-Z][a-z]*
matches any capitalized word.
•
The OR character (|) allows a choice between two regular expressions. For
example, jell(y|ies) matches either "jelly" or "jellies".
•
Braces ({}) are used to indicate a range of occurrences of a regular expression, in
the form {m, n} where m is a positive integer equal to or greater than zero
indicating the start of the range and n is equal to or greater than m, indicating
the end of the range. For example, (ba){0,3} matches up to three pairs of the
expression "ba".
Character Class
Matches
alpha
Any letter [A-Za-z]
upper
Any uppercase letter [A-Z]
lower
Any lowercase letter [a-z]
digit
Any digit [0-9]
alnum
Any alphanumeric character [A-Za-z0-9]
xdigit
Any hexadecimal digit [0-9A-Fa-f]
space
A tab, new line, vertical tab, form feed, carriage return, or space
Any printable character
punct
Any punctuation character
! ‘ # S % & ‘ ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~
graph
Any character defined as a printable character except those defined as
part of the space character class
cntrl
Any character not part of the character classes
[:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:]
Содержание COLDFUSION STUDIO 4.5-USING COLDFUSION...
Страница 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Страница 16: ...xvi Contacting Allaire...
Страница 90: ...82...
Страница 130: ...122...
Страница 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Страница 182: ...190...