草庐IT

265956512115091

全部标签

javascript - 在javascript中解析字符串

我如何在javascript上解析这个字符串,varstring="http://www.facebook.com/photo.php?fbid=322916384419110&set=a.265956512115091.68575.100001022542275&type=1";我只想得到字符串上的“265956512115091”。我以某种方式解析了这个字符串,但仍然不足以得到我想要的。我的代码:varnewstring=string.match(/set=[^]+/)[0];返回:a.265956512115091.68575.100001022542275&type=1