update regex to just get domains
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I have this working regex which will parse out all of the urls from an html blob, I would like to further reduce these to just get the domains (and subdomain)

https://regex101.com/r/Z6e1eg/1

for example this entry would reduce to

http://domain.org/ to domain.org

http://moredomains.com/Uploads/555201_101579965_n-300x300.jpg to moredomains.com

http://www.domain3.com/ to www.domain3.com

awarded to Wuddrum
Tags
regex

Crowdsource coding tasks.

1 Solution

Winning solution

Hey Qdev, this captures domains (and subdomains) in Group1: https://regex101.com/r/Z6e1eg/2

perfect!
Qdev 16 days ago