I need a regexp to strip out just the domain name part of a url. So for example if i had the following url:
http://www.website-2000.com
the bit I\'d want the
r/^[^:]+:\/\/[^/?#]+//
This worked for me.
It will match any scheme or protocol and then after the :// matches any character that's not a / ? or #. These three characters, when they first occur in a URL, signal the end of the domain so that's were I end the match.