fork(1) download
  1. <?php
  2.  
  3. $arTask = "Заявка: № 142898 от Аптека №Дн028 бла-бла-бла";
  4. if (preg_match_all('/№\s*\K\d{6,8}/iu', $arTask, $OUT)) {
  5. print_r($OUT[0]);
  6. }
Success #stdin #stdout 0.02s 24228KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 142898
)