Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 514

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
Using wildcards and special characters
Part of the strength of the Verity search is its use of wildcards and special characters to refine searches. Wildcard
searches are especially useful when you are unsure of the correct spelling of a term. Special characters help you search
for tags in your code.
Searching with wildcards
The following table shows the wildcard characters that you can use to search Verity collections:
Wildcard
Description
?
Matches any single alphanumeric character.
*
Matches zero or more alphanumeric characters.
Avoid using the asterisk as the first character in a
search string. An asterisk is ignored in a set, ([]) or an
alternative pattern ({}).
[ ]
Matches any one of the characters in the brackets.
Brackets [] indicate an implied OR.
{ }
Matches any one of a set of patterns separated by a
comma,
^
Matches any character not in the set.
-
Specifies a range for a single character in a set.
To search for a wildcard character as a literal, place a backslash character before it:
• 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 several 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.
Example
apple?
app*ed
<WILDCARD> 'sl[iau]m'
<WILDCARD> 'hoist{s,ing,ed}'
<WILDCARD>'sl[^ia]m'
<WILDCARD> 'c[a-r]t'
.
criteria='"M\\*"'>
Last updated 1/20/2012
Search result
apples or applet
Appleseed, applied, appropriated,
and so on
slim, slam, or slum
hoists, hoisting, or hoisted
slum, but not slim or slam
cat, cot, but not cut (that is, every
word beginning with c, ending
with t, and containing any single
letter from a to r)
509

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents