i have 1 2 : 3 , now i have to remove the ":" , after that need split it .
i had already success to remove the ":".
now my problem is 1 2 3, i just wan to split the 3 only.
after split the 3, 1 2 still maintain.
i wan the output is shown below :
1 2 3
1 2
3
May i know to to split the 3 only?
Loading

FroglegRank #1,020 · 1.9K reputationPosted Mar 29, 2011, 9:16 AM EDT
string[] ss = str.Split(':')
ss[0] // will equal 12
ss[1]// will equal 3
y s62 reputationPosted Mar 29, 2011, 9:53 AM EDT
1 2
3
not 1 2
3
VulpesRank #55 · 29.2K reputationPosted Mar 29, 2011, 10:33 AM EDT
It's just a matter of putting it together:
FroglegRank #1,020 · 1.9K reputationPosted Mar 29, 2011, 10:52 AM EDT
Raja KrishnamurthyRank #3,615 · 403 reputationPosted Mar 29, 2011, 11:28 AM EDT
@YS please try this:
string str = ( "12:3");
string[] ss = str.Replace(":","").Split(' ')
ss[0] // will equal 1
ss[1]// will equal 2
ss[2]//will equal 3
HTH.
Happy Programming!!!
Regards,
Raja
y s62 reputationPosted Mar 29, 2011, 12:20 PM EDT
Suthish NairRank #92 · 22.8K reputationPosted Mar 31, 2011, 9:10 AM EDT