I was asking myself if it possible to replace all the Environment.NewLine in a specific div with Regex? I tried some regex by myself but I didn't succeed in it. By the way, I know it's not the right way to parse HTML with Regex.
This is what I had so far:
Regex.Replace(text, @"(?<=<div class=""text"">.*?)" + Environment.NewLine + "(?=.*?</div>)", "<br/>");
Thanks!
` vs `
` see http://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br – Ωmega Jul 20 '12 at 21:49