I\'m trying to retrieve every external link of a webpage using Ruby. I\'m using String.scan with this regex:
String.scan
/href=\"https?:[^\"]*|href=\'https?:[^\
why you dont use groups in your pattern? e.g.
/http[s]?:\/\/(.+)/i
so the first group will already be the link you searched for.