Advertisement
danhgilmore

preg_match voodoo....

Apr 27th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2.  
  3. $pattern = "/[\b[A-Z0-9]{1}\/{1}[A-Z0-9]{2}\/{1}[0-9]{6,7}-{1}[0-9]{2}\b]/";
  4. $sample = '1/0Z/1234567-15';
  5.            
  6. if(preg_match($pattern, $sample))
  7. {
  8.     echo 'Match found';
  9. } else {
  10.     echo 'Not found';
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement