I was working with the Zend Framework and flowplayer and I needed to extract the ID from the url.
Here is the short JavaScript snippet.

[code language='jscript']
var extr_id_regex = new RegExp('(\d+)$', "gi");
var url = '/a/b/c/123';
var id = url.match(extr_id_regex);

if (id) {
alert(id);
}
[/code]

Related

Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer