开发者

how to match non-keyboard characters using php?

开发者 https://www.devze.com 2023-02-14 01:57 出处:网络
how can开发者_StackOverflow we match non-keyboards characters using php?? characters like-- ♠♣♥♦

how can开发者_StackOverflow we match non-keyboards characters using php?? characters like-- ♠♣♥♦

i want to check if a data contains non-keyboard characters and if it does i'll have to reject it as per my requirements.


Try

  • mb_ereg — Regular expression match with multibyte support

Example:

var_dump( mb_ereg('⊃', "≥⊂⊃⊄⊆⊇⊕⊗") ); // 1

You might want to clarify the question to get better answers/examples.

Also see

  • Are the PHP preg_functions multibyte safe?
0

精彩评论

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