最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
UBB代码~(整理)
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
[CODE]
'----------------------------------------------------------'
'--------------------UBBCode Function----------------------'
'----------------------------------------------------------'
Function UBBCode(ByVal strValue)
'忽略错误
On Error Resume Next
'定义变量
Dim RegExp
Dim strNewValue
Set RegExp = New RegExp
RegExp.IgnoreCase = True
RegExp.Global = True
strValue = UCase(HTMLEncode(strValue))
If strValue <> "" Then
RegExp.Pattern = "([URL])(.[^[]*)([/URL])"
strNewValue = RegExp.Replace(strValue,"$2")
RegExp.Pattern = "([URL])(HTTP://.[^[]*)([/URL])"
strNewValue = RegExp.Replace(strValue,"$2")
RegExp.Pattern = "([URL=(HTTP://.[^[]*)])(.[^[]*)([/URL])"
strNewValue = RegExp.Replace(strValue,"$3")
RegExp.Pattern = "([URL=(.[^[]*)])(.[^[]*)([/URL])"
strNewValue = RegExp.Replace(strValue,"$3")
RegExp.Pattern = "([IMG])(.[^[]*)([/IMG])"
strNewValue = RegExp.Replace(strNewValue," RegExp.Pattern = "([IMG=(HTTP://.[^[]*)])([/IMG])"
strNewValue = RegExp.Replace(strNewValue,"")
RegExp.Pattern = "([IMG=(HTTP://.[^[]*)])([/IMG])"
strNewValue = RegExp.Replace(strNewValue,"")
RegExp.Pattern = "([IMG=(.[^[]*)])([/IMG])"
strNewValue = RegExp.Replace(strNewValue,"")
RegExp.Pattern = "([SIZE=([0-9]*)])(.[^[]*)([/SIZE])"
strNewValue = RegExp.Replace(strNewValue,"$3")
-
上一个: ASP 无组件上传
-
下一个: 检测ISP是否支持ASP组件的代码
相关文章
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- ajax实现城市三级联动的代码介绍 09-16
- asp中获取日期为星期几的技巧 09-14