loop over it treating as a list delimited by the underscore character.

<cfset mylist = "AB_BC_DE" />
<cfset countVar = 1 />

<cfloop list="#myList#" delimiters="_" index="idx">
     <cfset variables["myVar" & countVar] = idx />
     <cfset countVar = countVar + 1 />
</cfloop>

<cfoutput>
        #myVar1#<br />
        #myVar2#<br />
        #myVar3#
</cfoutput>

On 3/8/07, Deepak Gupta <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a string like this
> AB_BC_DE
>
> Now i have to extract AB, BC, DE in seperate variables. How can I do that? 
> which function i can use.
>
>
> DG
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272044
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to