Guest User

Untitled

a guest
Sep 30th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. $string = "bla blа bla";
  2. $tempArray = explode(' ', $string);
  3. foreach($tempArray as $word){
  4. if(preg_match("/[x41-x7F]/", $word) == 1 && preg_match("/[x80-xFF]/", $word) == 1){
  5. echo $word," is incorrect";
  6. }
  7. }
  8.  
  9. $string = "bla blа bla";
  10. $tempArray = explode(' ', $string);
  11. foreach($tempArray as $word){
  12. if(preg_match("/[x41-x7F]/", $word) == 1 && !mb_ereg_match("/[x00-x7F]/", $word)){
  13. echo $word," is incorrect";
  14. }
  15. }
Add Comment
Please, Sign In to add comment