Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Chapter 18. Regular Expressions in ColdFusion

Anyone who has ever worked with regular expressions knows what an indispensable tool they can be for parsing and manipulating text. Without them, text-processing operations such as search and replace can be very difficult, to say the least. Those with experience in Unix-based languages such as Perl, awk, or Tcl are probably already familiar with regular expressions, as they are used extensively in those languages. For those new to the world of regular expressions, don’t worry. This chapter shows you everything you need to know to start using regular expressions in your ColdFusion applications.

ColdFusion provides you with two sets of ColdFusion functions for finding and replacing strings using regular expressions. REFind( ) and REFindNoCase( ) search for strings within blocks of text, while REReplace( ) and REReplaceNoCase( ) perform search and replace operations. Both sets of functions are extremely powerful and allow you to add a whole host of useful text-manipulation features to your ColdFusion applications.

Before we get into the mechanics of regular expressions, it is important for you to gain a basic understanding of the regular-expression language and how it is used by ColdFusion. Note that the regular-expression engine in ColdFusion MX differs significantly from the engine in all previous versions of ColdFusion. The new engine is “Perl compatible” for the most part, and it uses an underlying Java library for processing regular ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page