Node.js examples for String:URL String
Check if a string is a valid absolute url
isAbsUrl : function(s) { return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$'); },/*from w w w . j av a 2 s. c om*/ test : function(s, p) { s = s.nodeType == 1 ? s.value : s; return s == '' || new RegExp(p).test(s); }