I am using the following script but it's giving syntax errors which I am unable to figure out. Please help.
var str = "http://gaurav.com";
var patt1 = /^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$/;
console.log(str.match(patt1));
Thanks, Gaurav