def sf_regex(type, *args)
      type = type.to_sym unless type.is_a? Symbol
      type == :image && sf_img_regex(args.flatten) || sf_uri_regex[type]
    end
def sf_regex(type, *args)
      type = type.to_sym unless type.is_a? Symbol
      type == :image && sf_img_regex(args.flatten) || sf_uri_regex[type]
    end
Select regexes for URIs, protocols and image extensions.

 Example:
   >> sf_regex(:uri)
   => /\b((((ht|f)tp[s]?:\/\/).../i,
   >> sf_regex(:image, :jpg)
   => /(^http{1}[s]?:\/\/([w]{3}\.)?.+\.(jpg)(\?.+)?$)/i
 Arguments:
   type: (Symbol or String)
     - Regex type: :uri, :protocol, :image
   args: (*)
     - Anything.