fork(3) download
  1. <?php
  2.  
  3. $str = "abaaksjjkdhaf 29023487 - 1kfksdjf";
  4.  
  5. echo preg_replace('/[^\d-]/i', '', $str);
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
29023487-1