I have this code to remove URIs using these schemes:
htmldoc.gsub(/#{URI::regexp(['http', 'https', 'ftp', 'mailto'])}/, '')
However, it won't detect a capitalized URI like HTTP or Http unless I add them to the array.
I tried adding the case-insensitive flag i to the regex, but it didn't work.
Any idea how I could achieve this?