fork download
  1. <?php
  2.  
  3. $massive = "1H|\^&|||ttt|||||h|BATCH|P|1 P|1 O|1|5331|598^0012^1^^S1^SC|^^^133^1\^^^140^1|R||20190625132832||||N||||1|||||||20190625135509|||F R|1|^^^133/1/not|1.52|uIU/ml||N||F||admin|||E1 R|2|^^^140/1/not|4.99|pmol/l||N||F||admin|||E00 21 L|1|N 43";
  4.  
  5. preg_match_all('~\^{3}(?P<target>\d{3})~', $massive, $matches);
  6.  
  7. var_dump($matches['target']);
  8.  
  9. // your code goes here
Success #stdin #stdout 0.01s 82624KB
stdin
Standard input is empty
stdout
array(4) {
  [0]=>
  string(3) "133"
  [1]=>
  string(3) "140"
  [2]=>
  string(3) "133"
  [3]=>
  string(3) "140"
}