fork(1) download
  1. <?php
  2.  
  3. $url='http://w...content-available-to-author-only...w.new_pm.com/fr/lookbook/2.html';
  4. preg_match_all('@(?:[a-z]{2})?(lookbook)/?(\d*)(?:\.html)?@',$url,$result);
  5. print_r($result);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => lookbook/2.html
        )

    [1] => Array
        (
            [0] => lookbook
        )

    [2] => Array
        (
            [0] => 2
        )

)