fork download
  1. <?php
  2.  
  3. if (preg_match('/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))/', "https://google.com/picture.jpeg")) {
  4. echo "A match was found.";
  5. } else {
  6. echo "A match was not found.";
  7. }
Success #stdin #stdout 0.03s 52472KB
stdin
Standard input is empty
stdout
A match was found.