- <%
- FunctionSenFe_UbbCode(sContent)
- DimTempReg
- SetTempReg=NewRegExp
- WithTempReg
- .IgnoreCase=True
- .Global=True
- '自动识别网址
- IfInStr(Lcase(sContent),"http://")>0Then
- .Pattern="(^|[^<=""])(http:(\\/\\/|\\\\\\\\)(([\\w\\/\\\\\\+\\-~`@:%])+\\.)+([\\w\\/\\\\\\.\\=\\?\\+\\-~`@\\':!%#]|(&)|&)+)"
- sContent=.Replace(sContent,"$1<ahref=""$2""target=""_blank"">$2</a>")
- EndIf
- '自动识别www等开头的网址
- IfInStr(Lcase(sContent),"www.")>0orInStr(Lcase(sContent),"bbs.")>0Then
- .Pattern="(^|[^\\/\\\\\\w\\=])((www|bbs)\\.(\\w)+\\.([\\w\\/\\\\\\.\\=\\?\\+\\-~`@\\'!%#]|(&))+)"
- sContent=.Replace(sContent,"$1<ahref=""http://$2""target=""_blank"">$2</a>")
- EndIf
- EndWith
- SetTempReg=Nothing
- SenFe_UbbCode=sContent
- EndFunction
- %>
相关文章
猜你喜欢
- ASP.NET自助建站系统中如何实现多语言支持? 2025-06-10
- 64M VPS建站:如何选择最适合的网站建设平台? 2025-06-10
- ASP.NET本地开发时常见的配置错误及解决方法? 2025-06-10
- ASP.NET自助建站系统的数据库备份与恢复操作指南 2025-06-10
- 个人网站服务器域名解析设置指南:从购买到绑定全流程 2025-06-10

