首页 > 编程 > Regex > 正文

转换文本为超链接和电子邮件格式的代码教程

2020-03-01 19:59:08
字体:
来源:转载
供稿:网友

如果用户输入了http://aaa.bbb.ccc
下面这个代码将把他的输入转换成http://aaa.bbb.ccc
大家看看正则表达式有多厉害,呵呵。

    '调用这个函数来显示成超链接
    Response.Write to_html(s_message)
%>


Function to_html(s_string)
    to_html = Replace(s_string, """", """)
    to_html = Replace(to_html, "     to_html = Replace(to_html, ">", ">")
    to_html = Replace(to_html, vbcrlf, "
")
    to_html = Replace(to_html, "/     to_html = Replace(to_html, "/>", ">")
    to_html = edit_hrefs(to_html)
End Function
%>

以上就是转换文本为超链接和电子邮件格式的代码教程,感谢大家的阅读,更多内容请关注错新技术频道网站。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选