Rate this script:  I Love it  /   I Hate it

validate a url (regexp)


Code


function isUrl(s) {
        var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
        return regexp.test(s);
}
 

 

 
validate a url (regexp) scripts | validate a url (regexp) snippet | validate a url (regexp) example | validate a url (regexp) tutorial | validate a url (regexp) code