<% '// Copyright (c) 2000, Lewis Moten (modified by Ferruh Mavituna). All rights reserved. Function LinkURLs(ByVal asContent) Dim loRegExp ' Regular Expression Object (Requires vbScript 5.0 and above) ' If no content was received, exit the function If asContent = "" Then Exit Function Set loRegExp = New RegExp loRegExp.Global = True loRegExp.IgnoreCase = True '//-- by Ferruh Mavituna {http://ferruh.mavituna.com} '1/29/2004 '"www" added '"www." fixed '"www" fixed etc. loRegExp.Pattern = "((((ht|f)tps?://)|www\.)\S+[^\.*](\s)?)" ' Link URLs LinkURLs = loRegExp.Replace(asContent, "$1") ' // -- ' Look for email addresses loRegExp.Pattern = "(\S+@\S+.\.\S\S\S?)" ' Link email addresses LinkURLs = loRegExp.Replace(LinkURLs, "$1") ' Release regular expression object Set loRegExp = Nothing End Function %>