String split method
807603Jan 10 2008 — edited Jan 11 2008I want to tokenize a string based on following rules
delimiter is ,
escape char is \
example a\,b\,c,1,2
expected output a\,b\,c
1
2
Kindly suggest a solution. Please note that the string can be empty, only delimiter, only escaped delimiter, starting or ending with delimiter/escaped delimiter etc (This is a concatenated value of multiple strings entered by the user. To separate the strings, I use comma as delimiter. But the problem is that an individual string entry itself may contain comma, which I can mark by putting a slash before the comma, before concatenation)