If i have a string as follows:
http:/mydomain.com/index.php/this/is/an/amazing/url/param/560/
and i want to replace the value of 560, what is the way to do this.
Would a regex or string function be best used here and if so what would that be since the value can be different.
i.e.
the value can be anything:
http:/mydomain.com/index.php/this/is/an/amazing/url/param/120/
http:/mydomain.com/index.php/this/is/an/amazing/url/param/200/
also the trailing slash may be missing i.e.
http:/mydomain.com/index.php/this/is/an/amazing/url/param/560
/, does that have to be retained in the result?