I have a String like this : String attributes = \" foo boo, faa baa, fii bii,\" I want to get a result like this :
String attributes = \" foo boo, faa baa, fii bii,\"
String[] result = {\"foo boo\
If there is no text between the commas, the following expression will not create empty elements:
String result[] = attributes.trim().split("\\s*,+\\s*,*\\s*");