Deepak:

You can use the various List functions as long as you specify an underscore
as the delimiter.  If the string is always going to have 3 elements to it,
you could simply do something like:

        <CFSET str = "AB_BC_DE">
        <CFSET var1 = ListGetAt(str, 1, "_")>
        <CFSET var2 = ListGetAt(str, 2, "_")>
        <CFSET var3 = ListGetAt(str, 3, "_")>

If the string will not always be 3 elements long, combine ListGetAt() with
ListLen() and loop over the length of the "list" to dynamically pull out the
elements.

HTH

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


Deepak Gupta wrote:
> 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.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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

Reply via email to