remove everything before the last occurrence of a character

You have the right idea just replace the brackets with parentheses.

var string = "/Roland/index.php";
var result = string.substring(string.lastIndexOf("https://stackoverflow.com/") + 1);

Here is an example in jsfiddle and here is an explanation of the .lastIndexOf() method on the Mozilla Developer Network.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)