lundi 30 mars 2015

How to split a string without losing any word in JAVA

I was using eclipse for java.


I want to split an input line without losing any char.


For example input line is:



MAC 4 USD7MAIR 2014 USD1111IMAC 123 USD232MPRO 2-0-1-5


And the output should be :



MAC 4 USD7,MAIR 2014 USD1111,IMAC 123 USD232,MPRO 2-0-1-5


(If I split with "M" or etc. the char "M" itself will be remove.)


What should I do ?


Aucun commentaire:

Enregistrer un commentaire