fork download
  1. <?php
  2. $s = "test:002005@1111@333333@;10205@2000@666666@;002005@1111@55555@;";
  3. if(preg_match_all('/.*?(?:\d+@){2}(\d+)@;/',$s,$m)) {
  4. print_r($m[1]);
  5. }
  6.  
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 333333
    [1] => 666666
    [2] => 55555
)