<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'Extract domain name with RegExp'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Sat, 18 May 2013 21:45:16 GMT</pubDate>
<item>
<title>burnandbass said on 4/11/11</title>
<link>http://snipplr.com/view/51619/extract-domain-name-with-regexp/</link>
<description><![CDATA[ static private const URL_REGEXP:RegExp = /(https?:\/\/[-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?/


static public function getHost(url:String):String {
			var results:Array = url.match(URL_REGEXP);
			return results ? url.match(URL_REGEXP)[1] : null;
		}		
		
		public static function decode(s:String):String {
			return unescape(s.replace(/\+/g, ' '))
		}	

I use this functions to extract the URL and make all relative paths to absolute (sometimes I need to) ]]></description>
<pubDate>Mon, 11 Apr 2011 02:23:52 GMT</pubDate>
<guid>http://snipplr.com/view/51619/extract-domain-name-with-regexp/</guid>
</item>
</channel>
</rss>