Use the RemoveChars Function:
<cfset newTrimedValue = removeChars(q_yourDatabaseField.field, 1, 2)>

JMC

-----Original Message-----
From: Timothy Dineen [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 2:13 AM
To: CF-Community
Subject: TRIM or REPLACE?


Hey everyone:

OK, On a good day I could do this, but this hasn't been a good day:

I need to take a variable and either TRIM it or REPLACE characters in it so
that I end up with the same variable I started with minus the first two
characters.

For example, I have a field in the database as "F-12345" and I need to drop
the "F-" portion.  The "12345" portion and be a random length or could
contain alphabetical characters, so I can't just RIGHT() the last five
numbers...

Combo of REPLACE and TRIM or is there a better method?
Any help is appreciated.

Thanks, Tim
Exposure.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-community@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to