Ciao a tutti!

Ho una stringa che può essere:
- <P style="BACKGROUND-COLOR: #99ffff">ciao mamma</FONT>
- <P style="BACKGROUND-COLOR: #99ffff" style="COLOR: #ff0000">ciao mamma</FONT>

ecco nel secondo caso vedete che ho due style, solo che non è passabile per i validatori, io vorrei intervenire su quella stringa e farla diventare così:
<P style="BACKGROUND-COLOR: #99ffff; COLOR: #ff0000">ciao mamma</FONT>

è possibile?come lo devo fare?

Grazie