260
About Regular Expressions
Regular expressions allow you to perform very powerful and flexible string search
and replace operations. In traditional search and replace operations, as in the
and
for. This makes searches for dynamic data very difficult, if not impossible. For
example, how can you find the first occurrence in a string of any word that consists
entirely of capital letters that has spaces around it? Using regular expressions, the
task is trivial:
<cfset IndexOfOccurrence=REFind(" [A-Z]+ ","Some BIG string")>
<!--- The value of IndexOfOccurrence is 5 --->
You often process large amounts of dynamic textual data. Regular expressions can be
invaluable in writing complex ColdFusion applications.
You can use the case-insensitive functions,
expressions where the search string is likely to be mixed case.
functions of ColdFusion, you must provide the exact text to be searched
Replace
Chapter 14 Using Regular Expressions in Functions
REFindNoCase
Find
and
REReplaceNoCase
, for
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?
Questions and answers