-2

So I get a response as pairs of keys and values sum=199&name=arik&business=arik & sons&address=xyz

I m looking for a REGEX that will be able to split the keys and values

giving the following guidelines 1. first pair doesn't have the & 2. it could have & inside some of the values

Thank you

  • You don't need regex. See [this](https://stackoverflow.com/questions/41577376/how-to-read-values-from-the-querystring-with-asp-net-core) – Eldar Feb 02 '20 at 15:21
  • @Eldar I need a regex cause it's a general method which gets all the responses and I cannot parse a specific key – user2204114 Feb 05 '20 at 11:23

1 Answers1

0

The most practical thing to do is use the uri class (even if it's a fake url) and then use HttpUtility.ParseQueryString

terrencep
  • 675
  • 5
  • 16