Well, you should be able to do this using REFind.
For example, REFind("[0-9]*", myString , 1, true)
Look at the Help for REFind for handling the returned position and length of
the found item(s). You'll have to figure out how to handle multiple numbers
in your string.
-Original
grin OK, or you could do this:
#REReplaceNoCase("The width of the box is 54 ","[^0-9]","","ALL")#
-Original Message-
From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 1:26 PM
To: CF-Talk
Subject: pull numbers from a string...
Hi all..
is there a funcion that
cfset width= REReplace( '#numberstrip#', '[^0-9]', '', 'ALL' )
-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
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
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
5 matches
Mail list logo