You can use this:
function getYelpID(url) {
var m=/^(?:https?:\/\/)?(www\.)?yelp\.com\/biz\/([^\/]+)$/i.exec(str);
return m ? m[1] : null;
}
solved How do I validate if a string is valid Yelp URL in javascript? [closed]
You can use this:
function getYelpID(url) {
var m=/^(?:https?:\/\/)?(www\.)?yelp\.com\/biz\/([^\/]+)$/i.exec(str);
return m ? m[1] : null;
}
solved How do I validate if a string is valid Yelp URL in javascript? [closed]