Rumah > Soal Jawab > teks badan
<embed type="application/x-shockwave-flash" class="edui-faked-" pluginspage="http://www.macromedia.com/go/getflashplayer|
23da7cd13bc520fd554bb88a81c2f7635
|quot; src="http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe|
23da7cd13bc520fd554bb88a81c2f7637
|quot; width="420" height="280" wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true"/>
匹配上面embed:得到数组
array(
'0'=>'<embed type="application/x-shockwave-flash" class="edui-faked-" pluginspage="http://www.macromedia.com/go/getflashplayer|
23da7cd13bc520fd554bb88a81c2f76329
|quot; src="http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe|
23da7cd13bc520fd554bb88a81c2f76331
|quot; width="420" height="280" wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true"/>',
'1'=>'http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe'
)
高洛峰2017-04-11 08:59:25
preg_match('/http:|
2c4cf67eace99f5a255f0885ca8b56be0
|/v.qq.com/cover/(w)/(w+).html?vid=(w+)/is', $string, $match);
参考 正则表达式教程