This situation has no question yet. I wan't to detect if a string contains any link, that is all combinations of http,ftp,https, and the www., etc
Basically I want to prevent a string to contain any link.
I currently use:
name.split(/\s+/).find_all { |u| u =~ /^https?:/ }).count
What would be the best way to prevent any links in strings?