Let assume there is a string such as "https://testdomain.com/12345/testdocument.pdf"
I need only "testdocument.pdf" part.
Important part is, there is no exact location. Character size can be changed but needed part will always be at the end of string
Anyone can help me?
>Solution :
If you are sure that the needed part will be after the last ‘/’ character, then what you can do is
String url = "https://testdomain.com/12345/testdocument.pdf";
String neededPart = url.substring(url.lastIndexOf("/") + 1);