I'm having a difficulty splitting a string without removing whitespaces but removing all other non-characters. I have this school task to read in with BufferedReader and the text consists of lots of characters which even eclipse couldn't show. The elements i read in are in form of element1;element 2; element 3 (Element 4; Element 5 $Element 6 etc.. and one of the delimeters to remove should be ";".
I've tried .split(//W) but this removed all the whitespaces and some elements stayed completely empty although it removed characters well.
Right now i've used .split("[;(),$]") but this does not work properly since there are still characters which i can't recognize..