QuackFuzed.com is the personal ColdFusion coding blog of Matt Quackenbush. It exists primarily as a place for the author to learn, and hopefully to assist others in learning and/or avoiding some of the same pitfalls and mistakes. (Quack certainly makes enough mistakes daily to make up for the entire ColdFusion community.)
Method Composition Works Externally But Not Internally - reEscape(), reUnescape(), and reEscape2()
Posted on December 1, 2007 at 6:30 PM in General, ColdFusion
What is reEscape()?
Often times, when you pass a string through ColdFusion's built-in regular expression (regEx) functions [reFind()/reFindNoCase()/reReplace()/reReplaceNoCase()], the string needs to have regEx special characters escaped. reEscape() is a tidy little method that I wrote to do just that.
So, let's see reEscape() in action, and point out its good and its bad.
Latest Articles
- No recent entries.
Eventually something really brilliant and witty will appear right here.
Categories
- ColdBox (21) [RSS]
- ColdFusion (92) [RSS]
- Fusebox (3) [RSS]
- General (22) [RSS]
- jQuery (15) [RSS]
- Kalendar (1) [RSS]
- Linux (1) [RSS]
- Mura CMS (1) [RSS]
- Railo (1) [RSS]
- Rants (5) [RSS]
- Transfer (8) [RSS]
- Uni-Form Tag Library (36) [RSS]



On 12/1/07 at 10:06 PM, Sean Corfield said:
BTW, method chaining is foo().bar().wibble() - what you are doing is typically called method composition foo( bar( wibble() ) )
On 12/2/07 at 3:05 PM, Matt Quackenbush said: