Home >Backend Development >PHP Tutorial >求问一个正则表达式的有关问题

求问一个正则表达式的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:38:42922browse

求问一个正则表达式的问题
想匹配一个网页地址中的所有图像地址,写了正则表达式如下:

$reg="/<img \s*.*src\s*=\s*[\"|\']?\s*([^ alt="求问一个正则表达式的有关问题" >\"\']*)/i";


为什么像如下的图像文件地址:
<img  src="../Images/Album Cover/album_012.jpg" 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.cn