fork download
  1. <?php
  2.  
  3. $re = '~first.*second~s';
  4. $str = 'fddfgdfgfdg phrase here first
  5. sdafdsafdsa
  6. sadfsadf
  7. sadfdsaf
  8. phrase here second';
  9.  
  10. if (preg_match($re, $str, $matches)) {
  11. echo "Valid!";
  12. }
Success #stdin #stdout 0s 52480KB
stdin
Standard input is empty
stdout
Valid!