fork download
  1. <?php
  2.  
  3. $str = "99-01[10-10-2010]
  4. 59-06[11-12-2016]
  5. 99[333]
  6. 3333-ABC[99]88-XX";
  7.  
  8. $str = preg_replace('^/\d+-/m', 'ALL-', $str, 1);
  9.  
  10. echo $str;
Success #stdin #stdout #stderr 0.02s 52480KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  preg_replace(): No ending delimiter '^' found in /home/UlNKHo/prog.php on line 8