title: Javascript: How to extract multiple values from a string using regex?
body: <p>My string is like <code>https://www.facebook.com/connect/login_success.html?request=516359075128086&amp;to%5B0%5D=100004408050639&amp;to%5B1%5D=1516147434&amp;_=_</code></p>
  
  <p>This string is result of a app invitation url redirect request sent to fb.</p>
  
  <p>And what i want to do is, to extract user ids 100004408050639 and 1516147434 to an array.</p>
  
  <p>I tried <code>var fbCode = testString.match(/to%5B0%5D=(.*)&amp;/);</code> but this returns only one of these numbers, ie first occurrence.</p>