Home > Backend Development > PHP Tutorial > 婚配字符串

婚配字符串

WBOY
Release: 2016-06-13 12:42:54
Original
819 people have browsed it

匹配字符串

<br />
$handle="http://ec2.images-amazon.com/images/I/311%2Bk07cuIL._SL500_AA280_.jpg,http://ec2.images-amazon.com/images/I/418Qdk6bctL._SL500_AA280_.jpg,http://ec2.images-amazon.com/images/I/51bsLAswKVL._SL500_AA280_.jpg";<br />
<br />
preg_match_all('#src="(http://ec2\.images-amazon\.com/images/I/[a-z\d]+\._SL500_AA280_\.jpg)"#is',$handle,$m);<br />
<br />
print_r($m[1]); <br />
Copy after login



我是要匹配http://ec2.images-amazon.com/images/I/任意字符._SL500_AA280_.jpg


preg_match_all('#src="(http://ec2\.images-amazon\.com/images/I/[a-z\d]+\._SL500_AA280_\.jpg)"#is',$handle,$m);
这段匹配不了,请问哪里的问题呢??

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template