开发者

how to make a regular expression to accept

开发者 https://www.devze.com 2023-03-11 10:42 出处:网络
how to make a regular expression to accept only alphanumeric characters, accents, Asian and Arab? accept: á í ó ú is 個 の 开发者_如何学GoД

how to make a regular expression to accept only alphanumeric characters, accents, Asian and Arab?

accept: á í ó ú is 個 の 开发者_如何学GoД

deny: /'.

thanks


You can use Unicode character classes to pick and choose.

Not sure, but I guess in your case that would be:

 preg_match('/^[\p{Latin}\p{Han}\p{Arabic}]+$/u'
0

精彩评论

暂无评论...
验证码 换一张
取 消