Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

website link regex stackoverflow

var regex = new RegExp("^(http[s]?://(www.)?|ftp://(www.)?|www.){1}([0-9A-Za-z-.@:%_+~#=]+)+((.[a-zA-Z]{2,3})+)(/(.)*)?(?(.)*)?");

if(regex.test("http://google.com")){
  alert("Successful match");
}else{
  alert("No match");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #website #link #regex #stackoverflow
ADD COMMENT
Topic
Name
9+4 =