Home >Backend Development >PHP Tutorial > 求问一个正则表达式的有关问题
求问一个正则表达式的问题
想匹配一个网页地址中的所有图像地址,写了正则表达式如下:
$reg="/<img src="/static/imghwm/default1.png" data-src="../Images/Album Cover/album_012.jpg" class="lazy" \s*.*src\s*=\s*[\"|\']?\s*([^ alt=" 求问一个正则表达式的有关问题 " >\"\']*)/i";
<img src="/static/imghwm/default1.png" data-src="../Images/Album Cover/album_012.jpg" class="lazy" alt=" 求问一个正则表达式的有关问题 " >
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.cnPrevious article: 总是搞不懂foreach如何这样遍历这样的数组 Next article: 请教QQ互联的代码是如何写的?Related articles
See more