fork(1) download
  1. <?php
  2.  
  3. $text = ' Bla bla bla blabla bla
  4. Bla bla bla blabla bla
  5. blabla';
  6.  
  7. echo preg_replace('/^ +|( ) +| +$/m', '$1', $text);
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
Bla bla bla blabla bla
Bla bla bla blabla bla 
blabla