一聚教程网:一个值得你收藏的教程网站

热门教程

html转换成UBB代码

时间:2022-07-02 23:16:23 编辑:袖梨 来源:一聚教程网

html转换成UBB代码

Function Html2Ubb(str)
 If Str<>"" And Not IsNull(Str) Then
  Dim re,tmpstr
  Set re=new RegExp
  re.IgnoreCase =True
  re.Global=True
  re.Pattern = "()":Str = re.Replace(Str,"")
  re.Pattern = "(
)":Str = re.Replace(Str,"")
  re.Pattern ="()":Str = re.Replace(Str,"")
  re.Pattern ="()":Str = re.Replace(Str,"")
  re.Pattern ="(   re.Pattern ="(TABLE>)":Str = re.Replace(Str,"table>")
  re.Pattern ="(   re.Pattern ="(TR>)":Str = re.Replace(Str,"tr>")
  re.Pattern ="(   re.Pattern ="(TD>)":Str = re.Replace(Str,"td>")
  re.Pattern ="(   re.Pattern ="(Div>)":Str = re.Replace(Str,"div>")
  re.Pattern ="(   re.Pattern ="(   re.Pattern ="(   re.Pattern ="()":Str = re.Replace(Str,"")
  re.Pattern ="(   re.Pattern ="()":Str = re.Replace(Str,"")
  re.Pattern = "()":Str = re.Replace(Str, "")
  re.Pattern ="({)":Str = re.Replace(Str,"{")
  re.Pattern ="(})":Str = re.Replace(Str,"}")
  re.Pattern ="($)":Str = re.Replace(Str,"$")
  're.Pattern = "(

|)":Str = re.replace(Str,"
")
  're.Pattern = "(|)":Str = re.replace(Str,"")
  Set Re=Nothing
  Html2Ubb = Str
 Else
  Html2Ubb = ""
 End If
End Function