Remove Data from HTML text

Certified Associate Developer

Hi All,

Its very urgent.

I am facing an issue with removing <style>......</style> from the HTML text. I want to remove all the text/special character/all the property between style tag.

<html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style> <!-- @font-face {font-family:"Cambria Math"} @font-face {font-family:Calibri} p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif} span.EmailStyle17 {font-family:"Calibri",sans-serif; color:windowtext} .MsoChpDefault {font-family:"Calibri",sans-serif} @page WordSection1 {margin:72.0pt 72.0pt 72.0pt 72.0pt} div.WordSection1 {} --> </style></head><body  style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal">Body of the email</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal"><b>BOLD text</b></p><p class="MsoNormal"><b>&nbsp;</b></p><p class="MsoNormal"><b></b></p></div></body></html>

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Not working...

    I want to remove comments added in HTML text as mention above.

    <!-- @font-face {font-family:"Cambria Math"} @font-face {font-family:Calibri} p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif} span.EmailStyle17 {font-family:"Calibri",sans-serif; color:windowtext} .MsoChpDefault {font-family:"Calibri",sans-serif} @page WordSection1 {margin:72.0pt 72.0pt 72.0pt 72.0pt} div.WordSection1 {} --> 

Children