It's OK to put it in the online test tool, but it doesn't work with the echo array in the file.
This is the regular test tool that I can correctly match, why put to Preg_match_all ('/(\@[a-z]+\|[ \u4e00-\u9fa5]+\| [a-z]+\| [a-z]+\| [a-z]+\| [0-9]+)/is ', $a) is not good? Test tool Inside I choose the global search is OK, not select is not, is this the reason? Preg_match_all not a global search?
Regular
Share to:
------Solution--------------------
The correct wording is:
/(\@[a-z]+\
------Solution--------------------
[\x{4e00}-\x{9fa5}]+\
------Solution--------------------
[A-z]+\
------Solution--------------------
[A-z]+\
------Solution--------------------
[A-z]+\
------Solution--------------------
[0-9]+]/isu
------Solution--------------------
This \u4e00-\u9fa5 is a Unicode-encoded Chinese section, so you can see that your test tool is in the form of a Web page.
The regular engine of PHP does not recognize this format, and naturally it will not get the correct results.
------Solution--------------------
reference:
Quote: reference:
The correct wording is:
/(\@[a-z]+\
------Solution--------------------
[\x{4e00}-\x{9fa5}]+\
------ Solution--------------------
[a-z]+\
------Solution--------------------
[a-z]+\
------Solution-------- ------------
[a-z]+\
------Solution--------------------
[0-9]+]/isu
br>, thank you for the results. Already, ask, why I before those online test tools inside test The following this rule, can get the correct match, put in the file is not possible?
@[a-z]+\
------Solution--------------------
[\u4e00-\u9fa5]+\
------Solution--------------------
[A-z] +\
------Solution--------------------
[a-z]+\
------Solution--------------------
[a-z]+\
------Solution- -------------------