> rereplace(string,"[#chr(13)##chr(10)#]"," ","ALL")
That will potentially add a lot of extra spaces, because it'll place two for each line break on windows (one for each 13 and 10). It will handle multiple sequential line breaks properly (multiple spaces for multiple breaks), even though the count may be doubled. This RE will only add a single space, including for multiple line breaks, which may or may not be desireable: rereplace(string,"[#chr(13)##chr(10)#]+"," ","ALL") The only difference is the plus right ^ there. And no, I didn't magically plan out the placement of that caret to be on at the same position as the plus, it was sheer dumb luck. barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 26, 2003 7:22 AM > To: CF-Talk > Subject: Re: hard returns and text areas > > > > use replace to replace "chr(13)" with what ever you like. > > > replace("#string#","chr(13)"," ","ALL") > > > At 10:22 AM 8/20/2003 -0400, you wrote: > >>hi. does anyone know of a way to identify that a user has > >>entered a hard > >>return into a text-area and then pull those hard returns > >>out (or replace > >>them with just a single space). any help is greatly > >>appreciated. thanks > >>very much. > >> > > The syntax should be: > > replace(string,chr(13)," ","ALL") > > however... not all operating systems use chr(13) as part of > the carriage return, so the best bet is to replace both > chr(13) and chr(10)... I recommend a regular expression: > > rereplace(string,"[#chr(13)##chr(10)#]"," ","ALL") > > hth > > s. isaac dealey 972-490-6624 > > team macromedia volunteer > http://www.macromedia.com/go/team > > chief architect, tapestry cms http://products.turnkey.to > > onTap is open source http://www.turnkey.to/ontap > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

