fork(1) download
  1. <?php
  2.  
  3. $number = "a421zx";
  4. $number1 = "asfqe";
  5.  
  6. $matches = array();
  7.  
  8. $regexp = '/^[a-z](0-9){3}[a-z]{2}$/';
  9.  
  10. if (preg_match($regexp, $number, $matches)) {
  11. echo "All right";
  12. var_dump($matches);
  13.  
  14. } else {
  15. echo "Uncorrectly. Please, kill yorself\n";
  16. }
  17.  
  18.  
  19. if (preg_match($regexp, $number1, $matches)) {
  20. echo "All right";
  21. var_dump($matches);
  22.  
  23. } else {
  24. echo "Uncorrectly. Please, kill yorself\n";
  25. }
  26.  
  27.  
  28.  
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
Uncorrectly. Please, kill yorself
Uncorrectly. Please, kill yorself