$str = "https://xxxxxxxxx";if(preg_match("/^(http:\/\/|https:\/\/).*$/",$str)){ echo "yes";}亲测是可以的,你可以自己拿去试一试
if(preg_match("/\x20*https?\:\/\/.*/i","",$m)){ echo "yes";}else{ echo "no";}
这样匹配就可以的:$rex=@^http\:\/\/.+$;