21,887
社区成员
发帖
与我相关
我的任务
分享
<?php
$str=<<<STR
<div class="jin-flash_icon">
<a target="_blank" href="//view.jin10.com/news20190312181454391200.html"><i class="jin-icon jin-icon_flashNews"></i></a>
</div>
STR;
preg_match_all('#href="(.*?)"#', $str, $matches);
var_dump($matches);
array(2) {
[0]=>
array(1) {
[0]=>
string(53) "href="//view.jin10.com/news20190312181454391200.html""
}
[1]=>
array(1) {
[0]=>
string(46) "//view.jin10.com/news20190312181454391200.html"
}
}