MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 541

Developing coldfusion mx applications
Table of Contents

Advertisement

To search for a wildcard character as a literal, place a backslash character before it; for example:
To match a question mark or other wildcard character, precede the ? with one backslash. For
example, type the following in a search form: Checkers\?
To match a literal asterisk, you precede the * with two backslashes, and enclose the search term
with either single or double quotation marks. For example, type the following in a search form:
'M\\*' (or "M\\*") The following is the corresponding CFML code:
<cfsearch name = "quick_search"
collection="bbb"
type = "simple"
criteria="'M\\*'">
Note: The last line is equivalent to
Searching for special characters
The search engine handles a number of characters in particular ways as the following table
describes:
Characters
Description
, ( ) [
These characters end a text token.
A token is a variable that stores configurable properties. It lets the administrator or
user configure various settings and options.
= > < !
These characters also end a text token. They are terminated by an associated end
character.
' ` < { [ !
These characters signify the start of a delimited token. They are terminated by an
associated end character.
To search for special characters as literals, precede the following nonalphanumeric characters with
a backslash character (\) in a search string:
comma (,)
left parenthesis (
right parenthesis )
double-quotation mark (")
backslash (\)
left curly brace ({)
left bracket ([)
less than sign (<)
backquote (`)
In addition to the backslash character, you can use paired backquote characters (` `) to interpret
special characters as literals. For example, to search for the wildcard string "a{b" you can surround
the string with backquotes, as follows:
`a{b`
To search for a wildcard string that includes the literal backquote character (`) you must use two
backquote characters together and surround the entire string in backquotes:
`*n``t`
.
criteria='"M\\*"'>
Using explicit queries
541

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents