Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.15 KB | None | 0 0
  1. <?php
  2. $re = '/\+([359]+)([- ])2(\2)(\d{3})(\2)(\d{4})\b/';
  3. $str = readline();
  4.  
  5. preg_match_all($re, $str, $matches);
  6.  
  7. echo implode(', ', $matches[0]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement