Regex for removing all attributes from a paragraph
I know that regex usually should not be used for parsing html content. In my special case i need them
*(reason is, am using a rte editor and when pasting into the editor some replacement for attributes of paragraphs needs to be done).*

I have something like

    <p attribute1="val1" attribute2="val2" attribut="val3" ...>text blah blah</p>

and i need all attributes stripped out so that i get

    <p>text blah blah</p>

**How can this be done using a regex?**

A solution to strip out attributes from all possible html tags is appreciated too.


Regex for removing all attributes from a paragraph
===

I know that regex usually should not be used for parsing html content. In my special case i need them
*(reason is, am using a rte editor and when pasting into the editor some replacement for attributes of paragraphs needs to be done).*

I have something like

    <p attribute1="val1" attribute2="val2" attribut="val3" ...>text blah blah</p>

and i need all attributes stripped out so that i get

    <p>text blah blah</p>

**How can this be done using a regex?**

A solution to strip out attributes from all possible html tags is appreciated too.

