hey I am currently trying to replace html in a string. I.e <strong>text</strong> needs to be <b>text</b>
etc. (I realize the b tag is considered outdated)
I am aware that I shouldn't use regex to fix this, but this is currently my only option
my code:
//replace strong
text = Regex.Replace(text, "<strong>.*?</strong>", "<b>$1</b>");
//replace em
text = Regex.Replace(text, "<em>.*?</em>", "<i>$1</i>");
the issue here is that the regex replaces the tags and sets the text to $1. how to avoid this?
(I'm in C# btw.)