fork(6) download
  1. <?php
  2.  
  3. $re = '/(.*)<FooBar>/s';
  4. $str = "abcde\n fghij<FooBar>";
  5. if (preg_match($re, $str, $matches)) {
  6. echo $matches[1];
  7. }
  8.  
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
abcde
		fghij