I have a string containing regular text mixed with html how do i write a regex so I can replace specific p(paragraph) tags with regular text here’s an example of what I want to replace:
<p style="padding-left: 30px;">someText</p>
the regular expression should match and replace this specific tag with whitespace matching the padding-left attribute + the innerText.
Btw. I am doing the regex parsing in C#
You should use an html/xml parser instead, but assuming there are no nested tags and your attributes and styles are always defined in the same order, you can use this: