The Val() function will give you the first number that appears in the
string, so:

Val("The width of the box is 54") = 54

but

Val("I have 124 boxes of width 54") = 124


HTH,

Evan

> -----Original Message-----
> From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 11, 2001 2:26 PM
> To: CF-Talk
> Subject: pull numbers from a string...
>
>
> Hi all..
>
> is there a funcion that wil strip everything out of a string
> except numbers?
>
> ie.  The width of the box is 54"
>
> and I want to set
>
> <CFSET Width = 54>
>
> something like
>
> <CFSET Width = NumberStrip("The Width of the box is 54")>
>
> #width# = 54
>
> thanks in advance,
>
> ethan
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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