fork(6) download
  1. <?php
  2.  
  3. $str = 'некий текст[36465464]';
  4.  
  5. echo $str, PHP_EOL;
  6. echo preg_replace('/\[\d+\]/', '', $str);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
некий текст[36465464]
некий текст