A while back I wrote a custom tag for iterating over regular expression patterns. I think this would be a great use for it. I wrote up an example based on the proposed question:
http://www.bennadel.com/blog/1037-RELoop-ColdFusion-Custom-Tag-Case-Stud y.htm Or - http://bennadel.com/index.cfm?dax=blog:1037.view Hope that helps. ...................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ > Josh Nathanson wrote: > > Hey all, > > > > Got a regex challenge...I was able to solve it using an REFind and > > then REReplace, but I'm wondering if anyone can come with a "one-shot" > > way to replace without looping. > > > > I need to remove any carriage returns within a quoted string, but > > not touch them if they are outside quotes. So: > > > > "the quick brown fox \r\n jumps over the \r\n lazy dog" <-- remove > > the \r\n's > > > > My name is mud \r\n <-- leave this one alone > > > > I'm sure this is probably easy for the regex gurus... > > > > -- Josh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293282 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4