I've got a string that is a url, e.g.
www.example.com/something/2/other_stuff/2/1
and i've got an int, let's say in this example to be 2.
i would like to make a new url replacing the last occurence of that int with its next. So, in the example, what i want is:
www.example.com/something/2/other_stuff/3/1
The url can be written in any way, it has not a specific pattern. Once the new link is created, i would need also to check if it really exists on the web. Have you got any idea ?