Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REReplace (Upper and lower cases) 1

Status
Not open for further replies.

Extension

Programmer
Nov 3, 2004
311
CA
Hi,

I want to trim the alpha characters from a string, so that a string like atp3233, ATP3233 or Atp3233 would become 3233


Here's my current code (Works only with upper cases...)

Code:
<cfset StringtoTrim = "Atp3233">

<cfset NewString = REReplace(StringtoTrim,"[A-Z]","","ALL")>

Thank you in advance
 

Ok. Solved it. I need some sleep I guess

<cfset NewString = REReplaceNoCase(StringtoTrim,"[A-Z]+","","ALL")>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top