PHP regular get string URL

<?php
header("charset=utf-8;");
$str = 'Read who asked Jun to chant, the water falls and the fragrance floats, http://onestopweb.iteye.com/, a sharing and sharing website. <img src="http://www.iteye.com/">';
preg_match_all("/http:[\/]{2}[a-z]+[.]{1}[a-z\d\-]+[.]{1}[a-z\d]*[\/]*[A-Za-z\d]*[\/]*[A-Za-z\d]*/",$str,$arr);  
print_r($arr);

 

Effect picture:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326560883&siteId=291194637