<?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>The WebZappr &#187; url</title>
	<atom:link href="http://blog.webzappr.com/tag/url/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.webzappr.com</link>
	<description>My Random Web Snippets</description>
	<lastBuildDate>Wed, 17 Mar 2010 00:11:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Split up urls in their components</title>
		<link>http://blog.webzappr.com/2008/10/split-up-urls-in-their-components/</link>
		<comments>http://blog.webzappr.com/2008/10/split-up-urls-in-their-components/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:58:00 +0000</pubDate>
		<dc:creator>Thorsten</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://snipplr.wordpress.com/2008/10/10/split-up-urls-in-their-components/</guid>
		<description><![CDATA[This little call finds urls in a string and splits them up in their components. All with labels for easy usage.

preg_match_all('/(?P&#60;protocol&#62;(?:(?:f&#124;ht)tp&#124;https):\/\/)?(?P&#60;domain&#62;(?:(?!-)(?P&#60;sld&#62;[a-zA-Z\d\-]+)(?&#60;!-)[\.]){1,2}(?P&#60;tld&#62;(?:[a-zA-Z]{2,}\.?){1,}){1,}&#124;(?P&#60;ip&#62;(?:(?(?&#60;!\/)\.)(?:25[0-5]&#124;2[0-4]\d&#124;[01]?\d?\d)){4}))(?::(?P&#60;port&#62;\d{2,5}))?(?:\/(?P&#60;script&#62;[~a-zA-Z\/.0-9-_]*)?(?:\?(?P&#60;parameters&#62;[=a-zA-Z+%&#38;\&#38;amp;\'\(\)0-9,.\/_ -]*))?)?(?:\#(?P&#60;anchor&#62;[=a-zA-Z+%&#38;0-9._]*))?/x',$text,$data)

]]></description>
			<content:encoded><![CDATA[<p>This little call finds urls in a string and splits them up in their components. All with labels for easy usage.</p>
<pre class="brush: php;">
preg_match_all('/(?P&lt;protocol&gt;(?:(?:f|ht)tp|https):\/\/)?(?P&lt;domain&gt;(?:(?!-)(?P&lt;sld&gt;[a-zA-Z\d\-]+)(?&lt;!-)[\.]){1,2}(?P&lt;tld&gt;(?:[a-zA-Z]{2,}\.?){1,}){1,}|(?P&lt;ip&gt;(?:(?(?&lt;!\/)\.)(?:25[0-5]|2[0-4]\d|[01]?\d?\d)){4}))(?::(?P&lt;port&gt;\d{2,5}))?(?:\/(?P&lt;script&gt;[~a-zA-Z\/.0-9-_]*)?(?:\?(?P&lt;parameters&gt;[=a-zA-Z+%&amp;\&amp;amp;\'\(\)0-9,.\/_ -]*))?)?(?:\#(?P&lt;anchor&gt;[=a-zA-Z+%&amp;0-9._]*))?/x',$text,$data)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webzappr.com/2008/10/split-up-urls-in-their-components/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
