fork(1) download
  1. <?
  2. $string = "asdfsdfd----sdfsdfs-sdf-sdf";
  3.  
  4. echo preg_replace('/-+/', '-', $string);
  5.  
  6. ?>
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
asdfsdfd-sdfsdfs-sdf-sdf