Dick

Thats Just The Ticket!

Thanks Very Much

All the Best 
Jerry

-----Original Message-----
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: 10 June 2001 12:35
To: CF-Talk
Subject: RE: White Space




Try

<cfset White = "#Chr(9)##Chr(10)##Chr(11)##Chr(12)##Chr(13)#">
<cfset Questions = ReReplace(#OutputList.Question#, "[ #white#]*",
"","All")>

This will remove all spaces and white space.

Better for db insertion would be:

<cfset Questions = ReReplaceNoCase(#OutputList.Question#, "[^0-9A-Z_]*",
"","All")>

which kills all punctuation except the underscore.

HTH

Dick


At 11:42 AM +0100 6/10/01, Jerry Staple wrote:
>Hi Dick
>
>Ive tried the following code but to no avail:
>
><cfset White = "#Chr(9)##Chr(10)##Chr(13)##Chr(32)#">
><cfset Questions = ReReplace(#OutputList.Question#, "[#White#]+", " ",
>"All")>
>
>
><td height="10" width="25%" background="white-rect.gif">
>      <div align="center"><font face="Arial, Helvetica, sans-serif"
>size="2"><font color="Black"><nowrap><b>#Questions#</b></div>
>    </td>
>
>
>IE The question Output will be somrething Like "Service Company" in
>ordewr to insert into a database i would like to replace with either
>"ServiceCompany" or "Service_Company"
>
>
>Any Ideas
>
>Cheers
>
>Jerry
>
>-----Original Message-----
>From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
>Sent: 10 June 2001 11:19
>To: CF-Talk
>Subject: Re: White Space
>
>
>Oops, you said white space, not space!
>
>try
>
><cfset White = "#Chr(9)##Chr(10)##Chr(13)##Chr(32)#">
><cfset string = ReReplace(String, "[#White#]+", " ", "All")>
>
>
>
>>
>><cfset string = ReReplace(String, " +", " ", "All")>
>>
>>HTH
>>
>>Dick
>>
>>
>>At 10:15 AM +0100 6/10/01, Jerry Staple wrote:
>>>Hi
>>>Could anyone tell me the Best way to strip out white space from a
>>>string??
>>>
>>>Much Appreciated
>>>Jerry Staple
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to