mercredi 25 février 2015

How can I split a string based on chaging characters rather than one single separator?

I'm looking for a solution in java that will allow me to split a String like this one "MM/dd/yyyy", not based on the "/" slash but based on the change from "M" to "d" and from "d" to "y"?


The reason is that I may also need to split a string using this logic that has no separator at all, for example "yyMMdd".


Any ideas?


Aucun commentaire:

Enregistrer un commentaire