I have a String like this:
123,TV,August 14, 2020,"This is a fantasy series, and top rated"
I'm using String.split() on this but my delimiter should only separate the string based on comma with no trailing space.
Expected Output
["123","TV","August 14, 2020","This is a fantasy series, and top rated"]
Actual Output
["123","TV","August 14"," 2020","This is a fantasy series", " and top rated"]
It is splitting the strings considering all the commas. I just want to consider the commas with no trailing space or double quotes(").
Can someone please advice me on this?