I am working on java string split. I wish to split the String according to ". uppercase"(There is a space between ".
" and "uppercase"), for example:
". A" ". B" ". C"...
Also, I wish to preserve the "." and the "uppercase", is there any efficient way to do that? I use
String.split("\\.\\s")
before, but it will remove the "." I use. So that's not an ideal solution. Thanks
Sample result
String = This is an Egg. This is a dog. "I just come up with this example"
String[0] = This is an Egg.
String[1] = This is a dog. "I just come up with this example"
More edit:
There is an issue that the usual way seems will preserve the delimiter at one of it's string. but I wish to split the delimiter in some sense.(in my example, the ". [A-Z]" is splited too)