fork(3) download
  1. <?php
  2.  
  3. $str = 'T4MAX';
  4.  
  5. var_dump(preg_replace('~\d(?=\D*$)~', '$0 ', $str));
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
string(6) "T4 MAX"