fork download
  1. <?php
  2.  
  3. $x = 'www.site.com.br/numero/123/www.site.com.br/numero/124/www.site.com.br/numero/125/';
  4.  
  5. if (preg_match_all('#www\.site\.com\.br/numero/([^/]+)/#', $x, $matches)) {
  6. $matches = $matches[1];
  7.  
  8. print_r($matches);
  9. }
  10.  
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 123
    [1] => 124
    [2] => 125
)