html =
<div>
<p style="color: #555555; margin-top:32px;">
Sent
<span>
by
<a style="text-decoration:none; color: #875A7B;" href="http://www.example.com">
<span>YourCompany</span>
</a>
</span>
using
<a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=email"
style="text-decoration:none; color: #875A7B;">Odoo</a>.
</p>
I have this regex expression
html = re.sub(
'using' + "(.*)[\r\n]*(.*)>" + 'Odoo' + r"</a>", "", html,
)
and I get result
html =
<div>
<p style="color: #555555; margin-top:32px;">
Sent
<span>
by
<a style="text-decoration:none; color: #875A7B;" href="http://www.example.com">
<span>YourCompany</span>
</a>
</span>
.
</p>
</div>
but how can I update my regex to remove all from <p
tag. Basicaly i need empty <div
here but only if <p
tag includes words Sent
and by