Home > Backend Development > PHP Tutorial > 初学PHP正则表达式,这两个婚配的结果为什么不一样呢

初学PHP正则表达式,这两个婚配的结果为什么不一样呢

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:39:43
Original
875 people have browsed it

初学PHP正则表达式,这两个匹配的结果为什么不一样呢?

$str="s{title}dfsd{author}323{con}jf2l3k1sdjf";

$mode="/{(.*)}/U";

preg_match($mode,$str,$arr);

print_r($arr);

 ?>


$str="s{title}dfsd{author}323{con}jf2l3k1sdjf";

$mode="/{.*}/U";

preg_match($mode,$str,$arr);

print_r($arr);

 ?>

Related labels:
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