I have a standard URL e.g.
http://www.test.com/test1/test2.html
I am using javascript in riak for map reduce and would like to only extract www.test.com. So...the domain and the subdomain.
What is the most efficient method to do this in js since I will have millions of records?
Thanks