I don't know if this is even possible, I have the following regular expression (?<=[\?|\&])(?[^\?=\&#]+)=?(?[^\?=\&#]*)& which splits a URL into key/value pairs. I would like to use this in a replace function to build some markup:
string sTest = "test.aspx?width=100&height=200&";
ltTest.Text = Regex.Replace(sTest, @"(?<=[\?|\&])(?<key>[^\?=\&\#]+)=?(?<value>[^\?=\&\#]*)&",
"< div style='width:$2px; height:$2px; border:solid 1px red;'>asdf</div>");
this is generating:
test.aspx?<div style='width:100px; height:100px; border:solid 1px red;'>asdf</div><div style='width:200px; height:200px; border:solid 1px red;'>asdf</div>
Any ideas?
Thanks in advance!