<textarea name=jb51 cols=60 rows=6>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 0.05pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: install; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Text text. </SPAN></p>
</textarea><button onclick=alert(ubb())>alert</button>
<script>
function ubb(str)
{ var strout;
var re=/<p[\s\S]*?><span[\s\S]*?>(.*?)<\/span><\/p>/gi;
strout=(re,"<p>$1</p>");
return strout;
}
</script>