I want to extract the String URL label and retrieve parent and grandparent path from string
String url="ricsglobal:content/category/news-and-insight/type/wbef";
I want to check depth of this URL and want to find the grandparent path like this "ricsglobal:content/category/news-and-insight".