
x
Contents
Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Expressions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Statements
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Reserved words
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Differences from JavaScript
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Interaction of CFScript with CFML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Defining and Using Custom Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Defining functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Calling functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Using arguments and variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Identifying custom functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Examples of custom functons
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using custom functions effectively
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Chapter 14 Using Regular Expressions in Functions
. . . .
259
About Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Basic Regular Expression Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Character classes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Multicharacter Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Limiting input string size
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Anchoring a regular expression to a string
. . . . . . . . . . . . . . . . . . . . . . . . . . 264
Using Backreferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Using backreferences in replacement strings
. . . . . . . . . . . . . . . . . . . . . . . 265
Returning Matched Subexpressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Regular Expression Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Regular expressions in CFML
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Chapter 15 Indexing and Searching Data
. . . . . . . . .
269
Searching a ColdFusion Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Advantages of using Verity
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Supported File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Support for International Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Creating a Searchable Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Creating a Collection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Populating and indexing a collection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Selecting an indexing method
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Building a search interface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Indexing Query Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Indexing database query results
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Indexing cfldap query results
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Indexing cfpop query results
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...