http://www.somewhere.com/0123456789.html
How to extract the 01234567879 from the string?
Some Tutorial might help you getting behind RegExp. Some RegExp Tester might help you testing your regular expressions.
aside from that, you're probably looking for
var string = "http://www.somewhere.com/0123456789.html",
id = string.match(/\/(\d+)\.html/)[1];
alert(id);
Simply:
var str = "http://www.somewhere.com/0123456789.html";
var result = /\d+/.exec(str);
Result:
0123456789