很不错的一个UBB代码(4)
strValue=RegExp.Replace(strValue,"<font size=1>$2</font>")
RegExp.Pattern="(\[size=2\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<font size=2>$2</font>")
RegExp.Pattern="(\[size=3\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<font size=3>$2</font>")
RegExp.Pattern="(\[size=4\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<font size=4>$2</font>")
RegExp.Pattern="(\[center\])(.[^\[]*)(\[\/center\])"
strValue=RegExp.Replace(strValue,"<center>$2</center>")
End If
Set RegExp=Nothing
UBBCode=strValue
'输出错误
If Err.Number>0 Then
Response.Write Err.Description
Response.End
End If
End Function
%>
调用:<%=UBBCode(Content)%>