fork download
  1. <?php
  2.  
  3. $text = "f
  4. sdf
  5. d
  6. fdghg
  7. w
  8. ff
  9. f
  10. gggg
  11. gg";
  12.  
  13. echo preg_replace("/^\S\n/m", "", $text);
Success #stdin #stdout 0.02s 23664KB
stdin
Standard input is empty
stdout
sdf
fdghg
ff
gggg
gg