We found a strange phenomenon. if u is added, the results are different, and the results of uppercase and lowercase U are different. We found a strange phenomenon. if u is added, the results are different, and the results of uppercase and lowercase U are different.
Reply content:
We found a strange phenomenon. if u is added, the results are different, and the results of uppercase and lowercase U are different.
U (PCRE_UTF8)
This modifier opens an additional feature that is incompatible with perl. The pattern string is considered to be UTF-8. This modifier is available for php 4.1.0 or later in unix and php 4.2.3 In win32. Php 4.3.5 start to check the validity of the UTF-8 mode
U (PCRE_UNGREEDY)
This modifier reverses the "greedy" pattern of quantifiers. The quantifiers are non-greedy by default, followed by quantifiers? To make it greedy. This is incompatible with perl. It can also be set using the in-mode modifier (? U), or mark it with a question mark (such as. *?) after the quantifiers .*?).
Pattern modifier
U is in the lazy mode by default. if not added, the greedy mode is used by default.
One is the greedy mode, and the other is not the greedy mode. if the greedy mode is used, all results will be output. You can refer to the php help document.