I am not too good with Regular Expressions in Javascript. Does anyone know an efficient way to capture the last portion of a URL???
I have the following URL:
<
You can use following code snippet
var loc = location.href; var lastPart = loc.substr(loc.lastIndexOf('/') + 1);