Maison  >  Questions et réponses  >  le corps du texte

php正则匹配

<embed type=&quot;application/x-shockwave-flash&quot; class=&quot;edui-faked-&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer| 23da7cd13bc520fd554bb88a81c2f7635 |quot; src=&quot;http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe| 23da7cd13bc520fd554bb88a81c2f7637 |quot; width=&quot;420&quot; height=&quot;280&quot; wmode=&quot;transparent&quot; play=&quot;true&quot; loop=&quot;false&quot; menu=&quot;false&quot; allowscriptaccess=&quot;never&quot; allowfullscreen=&quot;true&quot;/>
匹配上面embed:得到数组
array(
'0'=>'<embed type=&quot;application/x-shockwave-flash&quot; class=&quot;edui-faked-&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer| 23da7cd13bc520fd554bb88a81c2f76329 |quot; src=&quot;http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe| 23da7cd13bc520fd554bb88a81c2f76331 |quot; width=&quot;420&quot; height=&quot;280&quot; wmode=&quot;transparent&quot; play=&quot;true&quot; loop=&quot;false&quot; menu=&quot;false&quot; allowscriptaccess=&quot;never&quot; allowfullscreen=&quot;true&quot;/>',
'1'=>'http://v.qq.com/cover/y/y7sekzn1avoyg0c.html?vid=x00207ht4fe'
)

ringa_leeringa_lee2771 Il y a quelques jours1866

répondre à tous(1)je répondrai

  • 高洛峰

    高洛峰2017-04-11 08:59:25

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

    répondre
    0
  • Annulerrépondre