I am trying to replace double nested quotes from string in C# using Regex, but not able to achieve it so far. Below is the sample text and the code i tried -
string html = "<img src=\"imagename=\"g1\"\" alt = \"\">";
string output = string.Empty;
Regex reg = new Regex(@"([^\^,\r\n])""""+(?=[^$,\r\n])", RegexOptions.Multiline);
output = reg.Replace(html, @"$1");
the above gives below output -
"<img src="imagename="g1 alt = >"
actual output i am looking for is -
"<img src="imagename=g1" alt = "">"
Please suggest how to correct the above code.