For instance in .NET I would do the following
Regex regex = new Regex("[?|&]?(?<key>[^=]+)=(?<value>[^&]+)");
This would give me 2 groups on a match ..."key" and "value".
All suggestions much appreciated.