TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Datta Kharad
NA
1.6k
53.4k
Big issue in split operation
Dec 20 2011 10:05 AM
Hi
//This is normal input line which is read from csv file and i want to get value only comma separator (i,e
Red
highlighted comma only)
Note:- I cant modify that line example:- remove double quote or add double quote in line
str="12
,
Goods
,
"LCD,HDD",V21,HIGH"
,
xyz
,
pqr
,
vbc"; //Input line
//I tried this code..I have separated in string array (named as arr) using comma(,) separator.
string[] arr= str.Split(',');
//After split value:- Actual array
arr[12]
arr[Goods]
arr["LCD]
arr[HDD"]
arr[V21]
arr[HIGH"]
arr[xyz]
arr[pqr]
arr[vbc]
//After split value:- Expected array
arr[12]
arr[Goods]
arr["LCD,HDD",V21,HIGH"]
arr[xyz]
arr[pqr]
arr[vbc]
//--------
----------
//Output
//
12
Goods
"LCD,HDD",V21,HIGH"
xyz
pqr
vbc
//If it will open in Excel file then it is displaying properly as like above output, but i want that output either in string variable or string array using c# code , so give me appropriate solution for doing that output.
Thanks in advance.
Reply
Answers (
7
)
How to generate controls dynamically ?
Default execution time set in set_time_limit()