<p>How can I take the string <code>foo[]=1&amp;foo[]=5&amp;foo[]=2</code> and return a collection with the values <code>1,5,2</code> in that order. I am looking for an answer using regex in C#. Thanks</p>

I don't know C#, but...
In java:
```
```
String[] nums = String.split(yourString, "&?foo[]");
```
```
The second argument in the
```
String.split()
```
method is a regex telling the method where to split the String.