正则表达式{}解决思路

WBOY
Release: 2016-06-13 11:07:43
Original
853 people have browsed it

正则表达式{}
{?\s*052DF14F-6F28-44A0-9130-294FDA6176EB\s*}?
求助这里的{}是什么意思,  一般的花括号里面值得是重复的字数
------解决方案--------------------
事实证明是不需要的

$s = 'aa{123}bb';<br />preg_match_all('/{.+}/', $s, $r);<br />print_r($r[0]);
Copy after login
Array
(
    [0] => {123}
)

这也是多模板引擎选择 {} 作为模板元素的标识的原因
不仅仅是 {} 很少出现在正文了,主要是书写的识别规则串很清爽
而 []、() 就不具备这个特点

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!