\"http://something.com:6688/remote/17/26/172\"
if I have the value 172 and I need to change the url to 175
\"http://something.com:6688/
var url = "http://something.com:6688/remote/17/26/172" url = url.replace(/\/[^\/]*$/, '/175')
Translation: Find a slash \/ which is followed by any number * of non slash characters [^\/] which is followed by end of string $.
\/
*
[^\/]
$