I'm stuck with this problem with regular expression.
Suppose i have a string that i've read from a file that contains.
first_name, Hello, "test Drive"
then i'll just split
it using ,
as delimiter. and i'll get
myString[0] = "first_name";
myString[1] = "Hello";
myString[2] = "\"test Drive\"";
My problem is when the system read a string with a ,
inside the double quotes
first_name, Hello, "test, Drive"
i get
myString[0] = "first_name";
myString[1] = "Hello";
myString[2] = "\"test"
myString[3] = "Drive\"";
My Question
How would i split a string using ,
as delimiter with a condition that no "
are present on it's left and right side.. or is there some workaround that will be much easier?
Thanks.