How to extract the word after the dot
I have a String shown in below format
String str = "query at.dddimin ntoreturn:1 reslen:1833 nscanned:1 nquery:
{ like_symbol: \"SC!JNJ\" } nreturned:1 bytes:1817";
i need to extract the word after the dot at shown above, so that the
output should be "dddimin"
I tried this way
String[] result = str.split("\\.");
System.out.println(result[1]);
But the output i am getting is below
dddimin ntoreturn:1 reslen:1833 nscanned:1 nquery: { unique_symbol:
"SC!JNJ" } nreturned:1 bytes:1817
Could anybody please tell me how can i get the word after the dot .
No comments:
Post a Comment