That's why I like to 'step' document my regex for others. I usually put all my regex into a structure set at the top of the page called regex. Each pattern has it's own (relatively) well named variable which I can use anywhere I like. Self documentation is always a good thing.
I'll be blogging soon (hopefully) about an upgrade project I'm doing which used a lot of regex to parse the entire current site to generate reports on the filename and location of things like cfincludes, custom tags, variable sets (cfset, cfparam, cfscript), cfqueries, etc. First step in an upgrade is to know where everything is. Second step is to write a style guide so that everyone is conforming to a standard. Third is where I am now. :) Oh to have the desire to blog. Too bad I've been turned off from it due to the 'positions' that require it now-a-days. :( > Relatively succinct but I'll be a lot of CF programmers would have to > spend some time figuring out what that did =) I didn't know about > those special replace sequences. > > Rick > > On Tue, Aug 10, 2010 at 1:26 AM, Michael Dinowitz > <mdino...@houseoffusion.com> wrote: >> >> In ColdFusion, but less convoluted. >> >> REReplace(string, '^(.+)$', '\U\1\E') >> ^(.+)$ - starting at the beginning of the string, capture all >> characters till the end >> \U - make all characters after it upper case until a \E is reached. >> >> http://www.houseoffusion.com/tutorials/regular-expressions/special-backreference.cfm > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:324615 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm