<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: 宋体; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'">文本文本文本。</span></p>
</textarea><button onclick=alert(ubb(jb51.value))>alert</button>
<script>
function ubb(str)
{ var strout;
var re=/<p[\s\s]*?><span[\s\s]*?>(.*?)<\/span><\/p>/gi;
strout=str.replace(re,"<p>$1</p>");
return strout;
}
</script>