User Guide
Chapter 14
Using Regular Expressions in
Functions
This chapter describes how regular expressions work in the following ColdFusion
functions:
• REFind
• REFindNoCase
• REReplace
• REReplaceNoCase
This chapter does not apply to regular expressions used in the cfinput and
cftextinput tags. These tags use JavaScript regular expressions, which have a
slightly different syntax than ColdFusion regular expressions.
For information on JavaScript regular expressions, see “Input Validation with cfform
Controls,” in Chapter 9. For detailed descriptions of the ColdFusion functions that
use regular expressions, see the CFML Reference.
Contents
• About Regular Expressions.....................................................................................260
• Basic Regular Expression Rules..............................................................................261
• Multicharacter Regular Expressions...................................................................... 263
• Using Backreferences..............................................................................................265
• Returning Matched Subexpressions......................................................................266
• Regular Expression Examples ................................................................................ 267