下面这个代码将把他的输入转换成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
%>