fork download
  1. <?php
  2.  
  3. $str = '#форум программистов #форум экономистов #форум
  4. ';
  5.  
  6. $str = preg_replace('~^(?:#[^#]+?(?:[^#]+?)?)*\n~m', '', $str);
  7.  
  8. var_dump($str);
Success #stdin #stdout 0.01s 24216KB
stdin
Standard input is empty
stdout
string(0) ""