Skip to content
Advertisement

Parse string in javascript

How can I parse this string on a javascript,

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

I just want to get the “265956512115091” on the string. I somehow parse this string but, still not enough to get what I wanted.

my code:

JavaScript

returns:

JavaScript

Advertisement

Answer

JavaScript

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

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement