Found a strange phenomenon, if you add u, the result is not the same, and the uppercase U and lowercase u results are not the same.
Reply content:
Found a strange phenomenon, if you add u, the result is not the same, and the uppercase U and lowercase u results are not the same.
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 from the UNIX version of PHP 4.1.0 or higher, Win32 version of PHP 4.2.3. PHP 4.3.5 start checking the utf-8 legitimacy of the pattern
U (PCRE_UNGREEDY)
This modifier reverses the "greedy" pattern of quantifiers. Make quantifiers default to non-greedy, followed by quantifiers? Way to make it greedy. This is not compatible with Perl. It can also be set using the in-mode modifier (? U), or mark its non-greedy (e.g.. *) with a question mark after the quantifier.
Pattern modifiers
U default to lazy mode, default to greedy mode if not added
One is greedy mode, one is not greedy mode, if greedy mode will output all the results. You can see the PHP Help documentation yourself.