正则表达式

正则表达式

//preg_match_all("/\<img.*src=[\"](.*?)[\"].*?\>/", $this->works->getContent(), $matches);
    //$str = '<p><img src="/js/plugins/ueditor/php/../../../../uploads/15/1210/5669478b6f523.jpeg" title="1.jpeg"/><img src="/js/plugins/ueditor/php/../../../../uploads/15/1210/56694796c084d.jpg" title="3.jpg"/></p>';
    //$this->content = $this->works->getContent();
    $this->content = preg_replace("/src=\"(.*?)\"/U", '\\1" width="100% ', $this->works->getContent());

标签: 正则表达式

添加新评论