Guest User

Untitled

a guest
Jul 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. preg_match_all("/([0-9]{8})/", $string, $match)
  2.  
  3. preg_match_all('/(?<!d)(d{8})(?!d)/', $string, $match)
  4.  
  5. preg_match_all('/^(d{8})$/', $string, $match)
  6.  
  7. preg_match_all('/^|D(d{8})D|$/', $string, $match)
  8.  
  9. preg_match_all('/(?<!d)(d{8})(?!d)/', $string, $match)
  10.  
  11. /b[0-9]{8}b/
  12.  
  13. $string = '34523452345 2352345234 13452345 45357567567567 24573257 35672456';
  14. preg_match_all("/b[0-9]{8}b/", $string, $match);
  15. print_r($match);
  16.  
  17. Array
  18. (
  19. [0] => Array
  20. (
  21. [0] => 13452345
  22. [1] => 24573257
  23. [2] => 35672456
  24. )
  25.  
  26. )
  27.  
  28. preg_match_all("/(?:^|D)(d{8})(?:D|$)/", $string, $match);
  29.  
  30. preg_match_all("/[^d]([d]{8})[^d]/", $string, $match)
Add Comment
Please, Sign In to add comment