Let say I have something like:
url=www.myurl.com
url2=myotherurl.com
url3=wwww3.anotherurl.com
❯ echo "$url \n$url2\n$url3" | sed 's/^www.//'
myurl.com
myotherurl.com
3.anotherurl.com
echo "$url \n$url2\n$url3" | sed 's/^www\d*\.//'
myurl.com
myotherurl.com
wwww3.anotherurl.com
I thought \d* is 0 or more digits
What I a want is to just get host.com
no matter if there is a www or www3 or if there no www used.
Thanks for you help