企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
>[danger] 正则匹配 img标签及src属性值 ```php $content = file_get_contents('1.html'); preg_match_all('/<img(.*?)src=\"(.*?)\"(.*?)>/is', $content, $matches); ``` ``` matches[0] //整个img标签 matches[2] //图片的url ``` >[danger] 修饰符: + i   忽略大小写 + s  单行文本模式