RegEx Support in ColdFusion
Now that you have an idea of what regular expressions are, you need to understand what kind of support ColdFusion provides for them. The basic facts are these:
- The syntax you can use in your regular expressions (that is, the wildcards and such) is nearly identical to the syntax supported in Perl.
- In ColdFusion, you use the reFind() and reReplace() functions to perform a RegEx operation. This is in contrast to the way regular expressions are invoked in Perl or JavaScript, which allow you to sprinkle them throughout your code almost as if the expressions were ordinary strings.
What Changed in ColdFusion
As I mentioned earlier, CFML's support for regular expressions was improved greatly for ColdFusion. RegEx enthusiasts who found the support lacking in previous versions are much happier now. The most important improvements are listed in Table 13.13 for the list of escape sequences for special characters.