class UrlExtract

Finds each URL in a plain text, with its place in the text:

UrlExtract.scan("See https://example.com/x and https://example.com/x").map(&:url)
# => ["https://example.com/x", "https://example.com/x"]

The URLs are raw: each URL as the text writes it, at each place, so a URL can come more than one time. UrlExtract.scan describes the options, and UrlExtract::Match describes a match.