I have that :).
I’m trying to handle the case when I get a “URL” without the http://
Instead of beating yourself up trying to come up with a regex, just
stick the ‘http://’ in front of it yourself.
unless path.index(‘http://’, 0)
path = ‘http://’ + path
host = URI.parse(path).host
It’s not necessarily the most robust solution, but you get the general