If you’re new here, you may want to subscribe to my RSS feed. Thanks for visiting!I don’t remember if i’ve already posted this.
Sometimes you need to extract a domain name from a url. The following regex will do just that regardless of subdomains, etc.
/^[a-z0-9.-]*?[.]{0,1}([a-z0-9-]*?\.[a-z.]{2,7})$/i
Share and Enjoy:
These icons link to social bookmarking sites where readers […]
I don’t remember if i’ve already posted this.
Sometimes you need to extract a domain name from a url. The following regex will do just that regardless of subdomains, etc.
/^[a-z0-9.-]*?[.]{0,1}([a-z0-9-]*?\.[a-z.]{2,7})$/i





