Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $string = "bla blа bla";
- $tempArray = explode(' ', $string);
- foreach($tempArray as $word){
- if(preg_match("/[x41-x7F]/", $word) == 1 && preg_match("/[x80-xFF]/", $word) == 1){
- echo $word," is incorrect";
- }
- }
- $string = "bla blа bla";
- $tempArray = explode(' ', $string);
- foreach($tempArray as $word){
- if(preg_match("/[x41-x7F]/", $word) == 1 && !mb_ereg_match("/[x00-x7F]/", $word)){
- echo $word," is incorrect";
- }
- }
Add Comment
Please, Sign In to add comment