fork download
  1. <?php
  2. $number = 'ё123жп';
  3. $regexp = '/[а-яё]{1}[0-9]{3}[а-яё]{2}/u';
  4. $matches = array();
  5. if(preg_match($regexp,$number,$matches)){
  6. echo"Allright, move on\n ";
  7. }
  8. else{
  9. echo"Something wrong, lets try it again\n";
  10. }
  11.  
  12. var_dump($matches);
  13.  
  14. // your code goes here
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Allright, move on
 array(1) {
  [0]=>
  string(9) "ё123жп"
}