fork(1) download
  1. <?php
  2.  
  3. // 3 examples
  4. $text1 = 'Hello world (see below).';
  5. $text2 = 'Lorem ipsum (there is a picture here) world!';
  6. $text3 = 'Attack on titan (is lorem) great but (should not be removed).';
  7.  
  8. // regex
  9. $regex = ''; // ??
  10.  
  11. // preg_replace strings
  12. $text1 = preg_replace($regex, '' , $text1);
  13. $text2 = preg_replace($regex, '' , $text2);
  14. $text3 = preg_replace($regex, '' , $text3);
  15.  
  16. echo $text1 .'<br>';
  17. echo $text2 .'<br>';
  18. echo $text3 .'<br>';
Success #stdin #stdout #stderr 0.03s 52480KB
stdin
Standard input is empty
stdout
<br><br><br>
stderr
PHP Warning:  preg_replace(): Empty regular expression in /home/PRVj6i/prog.php on line 12
PHP Warning:  preg_replace(): Empty regular expression in /home/PRVj6i/prog.php on line 13
PHP Warning:  preg_replace(): Empty regular expression in /home/PRVj6i/prog.php on line 14