Possible Duplicate:
Is there a way to split strings with String.split() and include the delimiters?
Suppose I have the following sentences-
What is your name? My name is Don. You are so nice!
I want the output by java as follows
What is your name?
My name is Don.
You are so nice!
I used the java split() method. but it split without the delimiters. i used split("[\\.!?]")