I'm trying to strip a bunch of websites down to their domain names i.e:
https://www.facebook.org/hello
becomes facebook.org
.
I'm using the regex pattern finder:
(https?:\/\/)?([wW]{3}\.)?([\w]*.\w*)([\/\w]*)
This catches most cases but occasionally there will be websites such as:
http://www.xxxx.wordpress.com/hello
which I want to strip to xxxx.wordpress.com
.
How can I identify those cases while still identifying all other normal entries?