I have a dynamically formed string like - part1.abc.part2.abc.part3.abc
whose length is unknown
In this string I want to get the substring based on second occurrence of "." so that I can get and part1.abc
part2.abc
part3.abc
.
And if the string is like - part1.abc.part2.abc.part3.abc.part4
output must be like part1.abc
part2.abc
part3.abc
part4
How to get this?