I'm no means an expert in regular expressions, but wouldn't it be easier and
quicker to use ReReplace() with a regular expression to remove letters?
Especially if it was a rather long text string, looping through it and
concatenating the string would be inefficient...

----- Original Message -----
From: "Lee Moore" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, December 11, 2000 7:05 AM
Subject: Re: Replace


> I'm not sure if this is the best solution but it should work.
>
> <cfset strIn = "k2i5dows38293fd7u0c2wdslk65jsf9">
> <cfset strOut = "">
> <cfloop index="i" from="1" to="#len(strIn)#">
>    <cfset char = mid(StrIn,i,1)>
>    <cfset strOut = strOut & iif(IsNumeric(char),DE(char),DE(""))>
> </cfloop>
> <cfoutput>#strOut#</cfoutput>
>
> Lee Moore
> Senior Project Manager
> WarpDrive Networks
> 201 825-4600 x 320
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to