Coffeescript converts your heregex into one regex:
var regex;
regex = /(((f|ht){1}tp(s)?:\/\/)[-a-zA-Z0-9@:%_\+.~?&\/\/=]+)/;
And javascripts regex syntax /regex/modsis shorthand for regex.compile ("regex", "mods"), so you don't need to compile it. You can simply add modifiers to heregex:
regex =
((f|ht){1}tp(s)?:
[-a-zA-Z0-9@:%_\+.~?&
)
source
share