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 split by / and get the last element of srray:
split
/
var last = 'http://localhost:3000/developers/568d3c3c82eea6e6fb47c236'.split('/').pop(); //=> 568d3c3c82eea6e6fb47c236