Site link regex Stackoverflow
var regex = new RegExp("^(https:\\/\\/www\\.){1}([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?";);
if(regex.test("http://google.com")){
alert("Successful match");
}else{
alert("No match");
}
Mystic Dev