Using Regular Expressions
Special characters
Because special characters are the operators in regular expressions, in order to
represent a special character as an ordinary one, you need to precede it with a
backslash. To represent a backslash, for instance, use a double backslash (\\).
Single-character regular expressions
This section describes the rules for creating regular expressions. You can use regular
expressions in the Search > Extended Find and Replace command to match complex
string patterns.
The following rules govern one-character RegExp that match a single character:
Special characters are: + * ? . [ ] ^ $ ( ) { } | \ &
Any character that is not a special character matches itself.
Use the keyboard (Tab, Enter) to match whitespace characters.
The asterisk (*) matches the specified characters throughout the entire
document.
The carat (^) matches the beginning of the document.
The dollar sign ($) matches the end of the document.
A backslash (\) followed by any special character matches the literal character
itself, that is, the backslash escapes the special character.
The # and - characters must be escaped in expressions (## --) just as though they
were special characters.
A period (.) matches any character, including a new line. To match any character
except a new line, use
carriage return and line feed codes.
A set of characters enclosed in brackets ([]) is a one-character RE that matches
any of the characters in that set. For example,
that if you want to include a closing square bracket (]) in square brackets, it must
be the first character. Otherwise, it does not work even if you use \].
Any regular expression can be followed by one of the following suffixes:
The syntax {,n} is not allowed.
A range of characters can be indicated with a dash. For example,
any lowercase letter. However, if the first character of the set is the caret (^), the
RegExp matches any character except those in the set. It does not match the
empty string. For example,
caret loses its special meaning if it is not the first character of the set.
All regular expressions can be made case-insensitive by substituting individual
characters with character sets, for example,
[^#chr(13)##chr(10)#]
{m,n} forces a match of m through n (inclusive) occurrences of the preceding
regular expression
{m,} forces a match of at least m occurrences of the preceding regular
expression
[^akm]
, which excludes the
matches an a, k, or m. Note
[akm]
matches any character except a, k, or m. The
[Nn][Ii][Cc][Kk]
91
ASCII
matches
[a-z]
.
Need help?
Do you have a question about the COLDFUSION STUDIO 5-USING COLDFUSION 5 STUDIO and is the answer not in the manual?