Use list functions. If the form is _always_ X_Y, then you can do:

<cfset first = listFirst(thevariable, "_")>
<cfset last = listLast(thevariale,"_")>

On 7/31/07, Seth Kovanic <[EMAIL PROTECTED]> wrote:
> Hey all,
>    I've got a dynamic variable that is created off of an automated 
> incrementing number, and I need to trim it down to a certain point.
>
> for example  the variable is 12_0,13_1,14_5,... and so on all contained 
> within a single field within a db.
>
> I want to build a loop to pull out both the 12 and the 0 in the first 
> example, then the 13 and the 1....and so on...and store them in two unique 
> variables I'll setup. I played around with trim and replace, but couldn't 
> quite get it figured out.
>
>
> This is probably really simple, but haven't been able to figure it out yet.
>
> Any ideas ?
>
> Thanks !
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2976
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to