I am making a json validation that needs to validate url that starts with http:// or https://
if(preg_match("/^[http://][a-zA-Z -]+$/", $_POST["url"]) === 0)
if(preg_match("/^[https://][a-zA-Z -]+$/", $_POST["url"]) === 0)
Am I wrong in synatx, and also how should i combine both (http and https) in same statement ?
Thank you !