28,390
社区成员
发帖
与我相关
我的任务
分享
<%
Dim ss, re, rv
ss = "<P class=MsoNormal style='MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; LINE-HEIGHT: 25pt; mso-line-height-rule: exactly; mso-char-indent-count: 1.8'><SPAN style='FONT-SIZE: 15pt; FONT-FAMILY: 仿宋_GB2312; mso-ascii-font-family: BatangChe; mso-hansi-font-family: BatangChe'>观赏型花卉生态园</SPAN><SPAN lang=EN-US style='FONT-SIZE: 15pt; FONT-FAMILY: 仿宋_GB2312; mso-hansi-font-family: 华文中宋'><o:p></o:p></SPAN></P>"
Set re = New RegExp
re.Pattern = "<\/?P[^>]*>"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
rv = re.Replace(ss,"")
response.write rv
%>
<%
Dim str,reg
str="fmogj<p class=MsoNormal style=""MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; LINE-HEIGHT: 25pt; mso-line-height-rule: exactly; mso-char-indent-count: 1.8"">哈哈哈</p>dfnei<p>你好</p>gg "
set reg = New RegExp
reg.Global=true
reg.Pattern="<p.*?>([\W\w]*?)<\/p>"
reg.IgnoreCase = True
Set matches=reg.execute(str)
For Each match In matches
response.write match.submatches(0) & "<br />"
Next
%>
var html = '<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; LINE-HEIGHT: 25pt; mso-line-height-rule: exactly; mso-char-indent-count: 1.8"><SPAN style="FONT-SIZE: 15pt; FONT-FAMILY: 仿宋_GB2312; mso-ascii-font-family: BatangChe; mso-hansi-font-family: BatangChe">观赏型花卉生态园</SPAN><SPAN lang=EN-US style="FONT-SIZE: 15pt; FONT-FAMILY: 仿宋_GB2312; mso-hansi-font-family: 华文中宋"><o:p></o:p></SPAN></P>';
html = html.replace(/<\/?P[^>]*>/gi, "" );
alert(html);//弹出转换结果,不需要可注释掉