how to match non-keyboard characters using php?
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?
精彩评论