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'])) {}
The 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.
p{Arabic}
/u
2.1m questions
2.1m answers
60 comments
57.0k users