html转换成UBB代码

作者:袖梨 2022-07-02

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

相关文章

精彩推荐