fork(5) download
  1. <?php
  2. preg_match_all( "/<img.*https?:\/\/[^\/]+\/([^\"']+)[\"'].*/i", "<img src='http://google.com/test/test/test/test.png' width='test'>", $match);
  3.  
  4. echo $match[1][0];
Success #stdin #stdout 0.02s 20568KB
stdin
Standard input is empty
stdout
test/test/test/test.png