在javascript中解析字符串

Rob*_*tan 5 javascript string parsing text-parsing string-parsing

如何在javascript上解析此字符串,

var string = "http://www.facebook.com/photo.php?fbid=322916384419110&set=a.265956512115091.68575.100001022542275&type=1";

我只是想在字符串上得到" 265956512115091 ".我以某种方式解析了这个字符串,但仍然不足以得到我想要的东西.

我的代码:

var newstring = string.match(/set=[^ ]+/)[0]; 
Run Code Online (Sandbox Code Playgroud)

收益:

a.265956512115091.68575.100001022542275&type=1
Run Code Online (Sandbox Code Playgroud)

Roy*_*mir 5

try this : 

  var g=string.match(/set=[a-z]\.([^.]+)/);

g[1] will have the value
Run Code Online (Sandbox Code Playgroud)

http://jsbin.com/anuhog/edit#source