求问一个正则表达式的问题
想匹配一个网页地址中的所有图像地址,写了正则表达式如下:
$reg="/<img \s*.*src\s*=\s*[\"|\']?\s*([^ alt=" 求问一个正则表达式的有关问题 " >\"\']*)/i";
<img src="../Images/Album Cover/album_012.jpg" alt=" 求问一个正则表达式的有关问题 " >
到空格的时候就终止了?
([^>\"\']*)这个条件应该不包含空格啊?
Array
(
[0] => Array
(
[0] => )
[1] => Array
(
[0] => ../Images/Album Cover/album_012.jpg
)
)Statement of this WebsiteThe 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.cnLatest Articles by Author
2024-10-22 09:46:29 2024-10-13 13:53:41 2024-10-12 12:15:51 2024-10-11 22:47:31 2024-10-11 19:36:51 2024-10-11 15:50:41 2024-10-11 15:07:41 2024-10-11 14:21:21 2024-10-11 12:59:11 2024-10-11 12:17:31Latest IssuesNow only one piece of data is returned. How to return all data that meets the conditions?From 1970-01-01 08:00:00000Does a member function without a self parameter mean it has become private?From 1970-01-01 08:00:00000PHP constants and variables external variables code problems in the textbookFrom 1970-01-01 08:00:00000