I have a regex problem in which I have to capture these examples of outputs(github.com, medium.com, www.nytimes.com, www.theguardian.com, techcrunch.com) in the links, the problem is some link doesn't have "www" so I this is my regex:
https?:\/\/([w]{3}?\.?)
What I thought is that, make the www optional but I dont want to capture it. Thanks!
edit: I found the solution!
https?:\/\/([\w\-\.]+)