<CFSET Width = REreplaceNoCase(variable, "[[:punct:]A-Za-z ]", "", "ALL")>
This will strip out all letters, spaces and punctuation.
Jeff Garza
Web Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200
[EMAIL PROTECTED]
http://www.spectrumastro.com
-----Original Message-----
From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 11:26 AM
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists