If you want to delete cr/lf: REReplace(str,"\r?\n","","all")
This is CFMX only (this should take care of cr/lf on windows AND lf on *nix). I never used a Mac, but if I understood correctly, \n will take care of cr on a Mac. For CF5, use "#chr(13)#?#chr(10)#" (this won't take care of mac, although I might be wrong) Pascal > -----Original Message----- > From: Tony Weeg [mailto:[EMAIL PROTECTED] > Sent: 13 December 2004 22:31 > To: CF-Talk > Subject: Re: reReplace() > > i know how to use the reReplace to replace characters and stuff, but > what about removing special things, like cr + lf, can you do that in > regex? > > ben :) anyone... > > thanks. > tony > > > On Mon, 13 Dec 2004 16:22:45 -0500, Tony Weeg <[EMAIL PROTECTED]> wrote: > > hi there. > > > > i need to remove all carriage returns and white space from the > > contents of a cfsavecontent. one problem. > > > > however, there are some *good* #Chr(13)##Chr(10)# that i want to keep. > > > > so, what i was thinking, is to put something like #Chr(0)# at each > *good* spot > > then after i replace all cf+lf and white space, ill drop > > #Chr(13)##Chr(10)# where i find > > all #chr(0)#'s > > > > although this doesnt seem to be too non-kludgy... so, any idea how i > > can remove all crappy whitespace and cr+lf from a cfsavecontent's > > value? > > > > all of this will end up in a csv file, which explains why i need all > > the crap removed.. > > > > thanks! > > > > -- > > tony > > > > Tony Weeg > > > > macromedia certified coldfusion mx developer > > email: tonyweeg [at] gmail [dot] com > > blog: http://www.revolutionwebdesign.com/blog/ > > cool tool: http://www.antiwrap.com > > > > > -- > tony > > Tony Weeg > > macromedia certified coldfusion mx developer > email: tonyweeg [at] gmail [dot] com > blog: http://www.revolutionwebdesign.com/blog/ > cool tool: http://www.antiwrap.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187516 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

