This maybe has been asked before, if so, please just refer the URL.
I have some string that I want to split, example:
"TEXTVALUE";NUMBER;"TEXTVALUE";DOUBLE;DATE;"TEXTVALUE"
But, after some line reads, in the original data I got something like this:
"TEXTVALUE;NUMBER;"TEXTVALUE;TEXTVALUE";DOUBLE;DATE;"TEXTVALUE"
Notice the second text data, it has the splitter character inside the quotes. I've been trying to work around this issue with a pattern, but I'm not sure how to achieve this.
Maybe something like:
string.split("["+character+"&&[^\"?[\\w*|"+character+"*]\"?]]");
or
string.split("["+character+"]&&[^\".*\"]");
This is the output I'm trying to achieve:
"TEXTVALUE"
NUMBER
"TEXTVALUE;TEXVALUE"
DOUBLE
DATE
"TEXVALUE"