how to add Arabic letters to url in regex
if (!preg_match("^(http|https|ftp)://[a-zA-Z0-9-.]+.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9-._?,'/\+&%$#=~])*$^",$_POST['url'])) {}
See Question&Answers more detail:oshow to add Arabic letters to url in regex
if (!preg_match("^(http|https|ftp)://[a-zA-Z0-9-.]+.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9-._?,'/\+&%$#=~])*$^",$_POST['url'])) {}
See Question&Answers more detail:osThe best option is to use an Unicode chracter class for that. It would be p{Arabic}
for your case. But don't forget that you should also add the Unicode PCRE modifier /u
at the end.