Ask for a regular expression (? & Gt; pattern) what does it mean? today, I found such a regular expression in the source code of smarty, which cannot be understood. please kindly advise.
(?> [^ "\ '= \ S] +)
Reply to discussion (solution)
?> Match from specified characters
Where can I see it?
If yes?> Start, should I add \ to the question mark?
I have never learned English. I guess
Oh, from?> The subsequent characters cannot be found in related articles...
(?> The difference between [^ "\ '= \ s] +) and ([^" \' = \ s] +) is none.
Where can I see it?
If yes?> Start, should I add \ to the question mark?
The question mark and the greater sign are not part of the regular expression. they are similar to the line expression of the windows command line.
For example:
C: \> dir
Its? Equivalent to C :\
> Yes
Its [^ "\ '= \ s] + is equivalent to dir
The above is my understanding
Where can I see it?
If yes?> Start, should I add \ to the question mark?
The Smarty_Compiler.class file contains a lot of such usage.
Where can I see it?
If yes?> Start, should I add \ to the question mark?
The question mark and the greater sign are not part of the regular expression. they are similar to the line expression of the windows command line.
For example:
C: \> dir
Its? Equivalent to C :\
> Yes
Its [^ "\ '= \ s] + is equivalent to dir
The above is my understanding
According to what I learned in the source code, it should not mean this.
I have solved this problem, (?> The pattern expression is called a curing group. it is mainly used to improve the efficiency of regular expressions and optimize regular expressions. it is a little different from normal regular expressions. to learn more, Baidu searches regular expressions to solidify the group.