how to split this string as single

Posted by Oswaldlily under ASP.NET on 2/20/2012 | Points: 10 | Views : 876 | Status : [Member] | Replies : 2
column1,column2,colum3,column4,colum5,column6,column7,column8,column9,column10
1,2,3,4,5,6,7,"abc,11",9,10

I separated these into columns separately according to commas using split() function
so abc and 11 also taken as separate column.
But it both shd consider as single column
hw to do this

*another prob is column heading has no double quotes but column value has double quotes




Responses

Posted by: Hmanjarawala on: 2/20/2012 [Member] Bronze | Points: 25

Up
0
Down
you can do one thing...
1st split string using (")...it will generate 3 new strings...
leave 2nd one and split 1st and 3rd with (,)...
join all array generated from these action into resultant array....

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 2/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Check this link
http://www.ezineasp.net/Samples/ASP-Net-cs/String-Functions/Split-Function/Default.aspx

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response