fork(1) download
  1. <?php
  2.  
  3. $input = 'Google: http://google.com
  4. YouTube: http://y...content-available-to-author-only...e.com
  5. wrong
  6. Stackoverflow: http://stackoverflow.com/';
  7. if (!preg_match('~(.*?):\s?(.*?)$~m', $input))
  8. {
  9. echo 'ok';
  10. }
  11. else
  12. {
  13. echo 'no';
  14. }
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
no