User Guide

Input Validation with cfform Controls 141
If the first character of a set of characters in bracket is the caret (^), the expression
matches any character except those in the set. It does not match the empty
string. For example: [^akm] matches any character except "a", "k", or "m". The
caret loses its special meaning if it is not the first character of the set.
You can make regular expressions case insensitive by substituting individual
characters with character sets, for example, [Nn][Ii][Cc][Kk].
You can use the following escape sequences to match specific characters or
character classes:
Multicharacter regular expressions
Use the following rules to build a multicharacter regular expression:
Parentheses group parts of regular expressions together into a subexpression 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 subexpression followed by an
asterisk (*) matches zero or more occurrences of the regular expression. For
example, [a-z]* matches zero or more lowercase characters.
Escape
Seq
Matches Escape
Seq
Meaning
[\b] Backspace \s Any of the following white space
characters: space, tab, form feed,
and line feed.
\b A word boundary such as a
space
\S Any character except the white
space characters matched by \s
\B A non-word boundary \t Tab
\cX The control character Ctrl-x. For
example, \cv matches Ctrl-v, the
usual control character for
pasting text.
\v Vertical tab
\d A digit character [0-9] \w An alphanumeric character or
underscore. The equivalent of
[A-Za-z0-9_]
\D Any character except a digit \W Any character not matched by \w.
The equivalent of [^A-Za-z0-9_]
\f Form feed \n a backreference to the nth
expression in parentheses. See
Backreferences
\n Line feed \ooctal The character represented in the
ASII character table by the
specified octal number
\r Carriage return \xhex The character represented in the
ASCII character table by the
specified hexadecimal number