<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Classic ASP Regular Expression Autolink Function</title>
	<atom:link href="http://asp.web.id/classic-asp-regular-expression-autolink-function.html/feed" rel="self" type="application/rss+xml" />
	<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html</link>
	<description>hot talks about asp programming</description>
	<lastBuildDate>Thu, 17 Jun 2010 08:45:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Pablo</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-365</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Thu, 01 Apr 2010 12:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-365</guid>
		<description>Very cool...awesome use of Regex!

Here&#039;s a more complete function which isn&#039;t as pretty, but will handle many more variations of links:

&#039;::Auto-Link Function
Function AutoLink(str,target)

	&#039;split into multiple &#039;words&#039;
	If IsNull(str) OR str = &quot;&quot; Then Exit Function
	str = Split(Trim(str))

	&#039;loop through and process each &#039;word&#039;
	For wCnt = 0 To UBound(str)
		wStr = str(wCnt)

		&#039;check for url wString
		If (Left(LCase(wStr),4) = &quot;http&quot; AND Len(wStr) &gt; 11 AND InStr(wStr,&quot;://&quot;) &gt; 0) _
		OR (Left(LCase(wStr),4) = &quot;www.&quot; AND Len(wStr) &gt; 11 AND InStrRev(wStr,&quot;.&quot;) &gt; 4) Then
			arrChar = &quot;!  0 Then
					lwStr = Right(wStr,Len(wStr)-locChar+1)
					wStr = Left(wStr,locChar-1)
					Exit For
				End If
			Next
			If InStr(LCase(wStr),&quot;http://&quot;) = 0 Then pwStr = &quot;http://&quot;
			wStr = &quot;&lt;a&gt;&quot; &amp; wStr &amp; &quot;&lt;/a&gt;&quot; &amp; lwStr

		&#039;check for email wString
		ElseIf (InStr(wStr,&quot;@&quot;) &gt; 0 AND len(wStr) &gt; 4 _
			AND InStr(wStr,&quot;@&quot;) = InStrRev(wStr,&quot;@&quot;) _
			AND InStr(wStr,&quot;href=mailto:&quot;) &lt;= 0) Then
			wStr = &quot;&lt;a&gt;&quot; &amp; wStr &amp; &quot;&lt;/a&gt;&quot;
		End If

		&#039;save newly formatted &#039;word&#039;
		str(wCnt) = wStr
	Next

	&#039;combine and return completely formatted string
	AutoLink = Join(str)
End Function</description>
		<content:encoded><![CDATA[<p>Very cool&#8230;awesome use of Regex!</p>
<p>Here&#8217;s a more complete function which isn&#8217;t as pretty, but will handle many more variations of links:</p>
<p>&#8216;::Auto-Link Function<br />
Function AutoLink(str,target)</p>
<p>	&#8216;split into multiple &#8216;words&#8217;<br />
	If IsNull(str) OR str = &#8220;&#8221; Then Exit Function<br />
	str = Split(Trim(str))</p>
<p>	&#8216;loop through and process each &#8216;word&#8217;<br />
	For wCnt = 0 To UBound(str)<br />
		wStr = str(wCnt)</p>
<p>		&#8216;check for url wString<br />
		If (Left(LCase(wStr),4) = &#8220;http&#8221; AND Len(wStr) &gt; 11 AND InStr(wStr,&#8221;://&#8221;) &gt; 0) _<br />
		OR (Left(LCase(wStr),4) = &#8220;www.&#8221; AND Len(wStr) &gt; 11 AND InStrRev(wStr,&#8221;.&#8221;) &gt; 4) Then<br />
			arrChar = &#8220;!  0 Then<br />
					lwStr = Right(wStr,Len(wStr)-locChar+1)<br />
					wStr = Left(wStr,locChar-1)<br />
					Exit For<br />
				End If<br />
			Next<br />
			If InStr(LCase(wStr),&#8221;http://&#8221;) = 0 Then pwStr = &#8220;http://&#8221;<br />
			wStr = &#8220;<a>&#8221; &amp; wStr &amp; &#8220;</a>&#8221; &amp; lwStr</p>
<p>		&#8216;check for email wString<br />
		ElseIf (InStr(wStr,&#8221;@&#8221;) &gt; 0 AND len(wStr) &gt; 4 _<br />
			AND InStr(wStr,&#8221;@&#8221;) = InStrRev(wStr,&#8221;@&#8221;) _<br />
			AND InStr(wStr,&#8221;href=mailto:&#8221;) &lt;= 0) Then<br />
			wStr = &quot;<a>&#8221; &amp; wStr &amp; &#8220;</a>&#8221;<br />
		End If</p>
<p>		&#8216;save newly formatted &#8216;word&#8217;<br />
		str(wCnt) = wStr<br />
	Next</p>
<p>	&#8216;combine and return completely formatted string<br />
	AutoLink = Join(str)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jannerman</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-362</link>
		<dc:creator>jannerman</dc:creator>
		<pubDate>Tue, 16 Mar 2010 11:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-362</guid>
		<description>great bit of code, the only way it could be better was if it was able to interpret www.google.co.uk and pass it as http://www.google.co.uk rather than http://www.thehostwebsite.co.uk/www.google.co.uk but it&#039;ll do for now!</description>
		<content:encoded><![CDATA[<p>great bit of code, the only way it could be better was if it was able to interpret <a href="http://www.google.co.uk" rel="nofollow">http://www.google.co.uk</a> and pass it as <a href="http://www.google.co.uk" rel="nofollow">http://www.google.co.uk</a> rather than <a href="http://www.thehostwebsite.co.uk/www.google.co.uk" rel="nofollow">http://www.thehostwebsite.co.uk/www.google.co.uk</a> but it&#8217;ll do for now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bauke</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-359</link>
		<dc:creator>Bauke</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-359</guid>
		<description>Great!

a) One of the first results of my query in Google
a) Works like a charm!

Thanks a lot</description>
		<content:encoded><![CDATA[<p>Great!</p>
<p>a) One of the first results of my query in Google<br />
a) Works like a charm!</p>
<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ariel G. Saputra</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-84</link>
		<dc:creator>Ariel G. Saputra</dc:creator>
		<pubDate>Mon, 29 Jun 2009 23:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-84</guid>
		<description>@roei + SzR
yeah sorry all the escape chars was stripped out in the pattern, it should be working now.
thanks for reporting</description>
		<content:encoded><![CDATA[<p>@roei + SzR<br />
yeah sorry all the escape chars was stripped out in the pattern, it should be working now.<br />
thanks for reporting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SzR</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-83</link>
		<dc:creator>SzR</dc:creator>
		<pubDate>Mon, 22 Jun 2009 13:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-83</guid>
		<description>autolinkfunction is not working.</description>
		<content:encoded><![CDATA[<p>autolinkfunction is not working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roei</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-81</link>
		<dc:creator>roei</dc:creator>
		<pubDate>Mon, 22 Jun 2009 12:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-81</guid>
		<description>it&#039;s not working</description>
		<content:encoded><![CDATA[<p>it&#8217;s not working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Autolink with classic asp &#38; regular expression</title>
		<link>http://asp.web.id/classic-asp-regular-expression-autolink-function.html/comment-page-1#comment-31</link>
		<dc:creator>Autolink with classic asp &#38; regular expression</dc:creator>
		<pubDate>Sun, 17 May 2009 12:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://asp.web.id/?p=17#comment-31</guid>
		<description>[...] implementation of regular expression in Classic ASP script to create link from text (autolink), this is useful when you need to turn a bunch of text to be a clickable link when it is in a valid [...]</description>
		<content:encoded><![CDATA[<p>[...] implementation of regular expression in Classic ASP script to create link from text (autolink), this is useful when you need to turn a bunch of text to be a clickable link when it is in a valid [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
