Hello
There is a line:

<p class="MsoBodyText" style="margin-right:-.1pt;text-indent:36.0pt;line-height: 

150%; page-break-after: avoid "> Some text </ p>

You need to remove the class and style attributes so that at the end it’s like this:

 <p>Some text</p> 

This is a string, not a DOM element.
Thank.

  • why not make a DOM element of it? - zb '

1 answer 1

It feels like that

 myString.replace(/<p[^>]*>(.*)<\/p>/, '<p>$1</p>'); 
  • (. *?) - ReinRaus