Home >Backend Development >PHP Tutorial >php regular matching

php regular matching

WBOY
WBOYOriginal
2016-07-06 13:52:132637browse


匹配上面embed:得到数组
array(
'0'=>'',
'1'=>'http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe'
)

回复内容:


匹配上面embed:得到数组
array(
'0'=>'',
'1'=>'http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe'
)

preg_match('/http:|2c4cf67eace99f5a255f0885ca8b56be0|/v.qq.com/cover/(w)/(w ).html?vid=(w )/is', $string, $match);
参考 正则表达式教程

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn