I'm trying to no avail, to split a sentence on every second space.
So given, this sentance:
you're a sausage bap
I have a working example of a single space split:
message.split("\\s+")
which gives me:
your
a
sausage
bap
but I need
your a
sausage bap
I've tried:
message.split("\\S+(\\s\\S+)?")
as per: Java. How can I split a string with multiple spaces on every nth space?
which doesn't work for me.