One of the best parts of coding with the help of ChatGPT is learning about built-in APIs that I never thought to look for.

Today I wanted to iterate over some links in a string, and ChatGPT turned me on this gem of an API: URI#extract.

Pass it a string with URLs and specify the schemes you want to extract.