fork(1) download
  1. <?php
  2.  
  3. $s = "test > >";
  4. echo preg_replace("/(?<!> )> >(?!\s*>)/",">>>>", $s);
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
test >>>>