Ideally, I'd like to capture foo.com from something like http://foo.com/bar?param=value or https://www.foo.com
Thanks.
Edit: Sorry for the vagueness. I'll be doing this in Javascript.
2nd Edit: I should post my terrible first attempt: https?://w?w?w?[.]?[^?/]