Given a string with URLs in the following formats:
https://www.cnn.com/
http://www.cnn.com/
http://www.cnn.com/2012/02/16/world/american-nicaragua-prison/index.html
http://edition.cnn.com/?hpt=ed_Intl
W JS/jQuery, how can I extract from the string just cnn.com for all of them? Top level domain plus extension?
Thanks