try something like


<CFOUTPUT>#REReplace(sString, "[^[:digit:]]", "", "ALL")#</CFOUTPUT>


HTH

-----Original Message-----
From: Crystal Gatewood [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 19:06
To: CF-Newbie
Subject: Re:Extracting a number from a text string

There is no guarantee that there will be three numbers after the dash. The
only guarantee is that there will be letters-numbers.

I am trying to use the REFind() function, but I cannot get all of the
numbers, nor is it giving the correct number of numbers after the dash.

> if they're all formatted like that you could just use the right
> function.
> <cfoutput>#right(msg1,3)#</cfoutput>
>
> -----Original Message-----
> From: Crystal Gatewood [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2003 11:23 AM
> To: CF-Newbie
> Subject: Extracting a number from a text string
>
>
> I am entering a web-based form into a database. The database has an
> auto-number field as the primary key, but for the user's purposes,
> there is a different ID field called ActionItemNo. The Action Item
> number is a combination of 2 to 8 letters and a number, separated by a
> dash (ex. MGMT IPT-007 or DP-007). The letters represent different AI
> types.
>
> When a new form is entered, I need to assign to it the next number for
> that type. I can get the last entry for that type, but I am having a
> hard time separating the number part so that I can add 1 to it
> (creating the next number to be assigned).
>
> Any help I can get will be greatly appreciated.
>
> Happy Thanksgiving (where applicable),
> Crystal
  
> _____  
>
  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to