php 正则表达式怎么匹配标签里面的style?
$str = '<div style="margin:0px;text-align:left;padding:0px;">任意内容</div>'; $reg = '#<div style=".*">(.*)</div>#'; preg_match_all($reg , $str , $matches); var_dump($matches);
https://zhidao.baidu.com/question/332235315308735045.html
赞赏码
![](https://files.cnblogs.com/files/lxwphp/zhifubao2.bmp)
![](https://files.cnblogs.com/files/lxwphp/weixin.bmp)
非学,无以致疑;非问,无以广识