fork download
  1. <?php
  2.  
  3. $pattern = '/^[0-9]{2}$/';
  4. $input = '00';
  5. if (preg_match($pattern, $input, $matches)){
  6. echo 'Đây số có 2 chữ số';
  7. }
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Đây số có 2 chữ số