extnewbie
18 Aug 2008, 7:18 AM
Hi,
I have a long json string that has included the string: "size":"100,100" several times.
where the numbers 100,100 is different each time.
I can find the first occurance of the string with the regex below.
But with more occurances: xy[1],xy[2] it dosen't work
var xy = rest.match(/"size":\"\s?([0-9]+)\s?,\s?([0-9]+)\s?\"/);
alert(xy[0]);
Can anybody tell whats wrong?
Thanks
I have a long json string that has included the string: "size":"100,100" several times.
where the numbers 100,100 is different each time.
I can find the first occurance of the string with the regex below.
But with more occurances: xy[1],xy[2] it dosen't work
var xy = rest.match(/"size":\"\s?([0-9]+)\s?,\s?([0-9]+)\s?\"/);
alert(xy[0]);
Can anybody tell whats wrong?
Thanks