title: How to parse host out of a string in Redshift?
body: <p>I'm looking for a Postgres (actually Redshift) equivalent to <a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-StringFunctions" rel="nofollow">Hive's parse_url(..., 'HOST')</a>.</p>
  
  <p><a href="http://www.postgresql.org/docs/8.3/static/test-parser.html" rel="nofollow">Postgres docs</a> say it has a URL parser as part of its full text search.  This blog post has <a href="http://www.jourlin.com/post/2011/07/19/A-PostgreSQL-query-to-extract-a-domain-name-from-a-URL" rel="nofollow">a regex</a> which may or may not be bulletproof.  What is best?</p>