<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kalkran.COM &#187; regular expressions</title>
	<atom:link href="http://kalkran.com/tag/regular-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://kalkran.com</link>
	<description>Design&#38;Coding</description>
	<lastBuildDate>Fri, 26 Feb 2010 15:48:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>RegEx to find URLs and turn them into hyperlinks</title>
		<link>http://kalkran.com/tutorials/php/regex-to-find-urls-and-turn-them-into-hyperlinks/</link>
		<comments>http://kalkran.com/tutorials/php/regex-to-find-urls-and-turn-them-into-hyperlinks/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 10:11:12 +0000</pubDate>
		<dc:creator>Kalkran</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://kalkran.com/?p=102</guid>
		<description><![CDATA[&#160; $string = preg_replace&#40;&#34;/(http:\/\/)?([a-zA-Z0-9\-.]+\.[a-zA-Z0-9\-]+([\/]([a-zA-Z0-9_\/\-.?&#38;%=+])*)*)/&#34;, '&#60;a href=&#34;http://$2&#34;&#62;$2&#60;/a&#62;', $string&#41;; That little gem right there'll take any length of text and turn the urls in it into hyperlinks. Cool or what? :-)]]></description>
			<content:encoded><![CDATA[<pre class="php">&nbsp;
<span style="color: #0000ff;">$string</span> = <a href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/(http:<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\/</span>)?([a-zA-Z0-9<span style="color: #000099; font-weight: bold;">\-</span>.]+<span style="color: #000099; font-weight: bold;">\.</span>[a-zA-Z0-9<span style="color: #000099; font-weight: bold;">\-</span>]+([<span style="color: #000099; font-weight: bold;">\/</span>]([a-zA-Z0-9_<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\-</span>.?&amp;%=+])*)*)/&quot;</span>, <span style="color: #ff0000;">'&lt;a href=&quot;http://$2&quot;&gt;$2&lt;/a&gt;'</span>, <span style="color: #0000ff;">$string</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>That little gem right there'll take any length of text and turn the urls in it into hyperlinks. Cool or what? :-)</p>
<img src="http://kalkran.com/?ak_action=api_record_view&id=102&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://kalkran.com/tutorials/php/regex-to-find-urls-and-turn-them-into-hyperlinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

