I'm trying to get the domain name of a URL. I could run a series of if statements that check what the url contains, but ideally I'd use a regex.
The following regex ^[^.]*:[\/]{0,2}[w]{0,3}[.]{0,1}[\w]*.[\w\W]*$
does enough of what I want.
This applies for:
https://www.google.com
http://www.google.com
www.google.com
Now I just want to get google.com
from this regex, but unsure how to do that.