I have to split and replace the values using C# and want to find the last occurring slash / from a string and replace the contents after the last slash / For example:
var word = “www.abc/def/ghf/ijk/default.aspx“;
should become
var word =”www.abc/def/ghf/ijk/replacement“;
The number of slashes may vary each time.
1 Answer