Regular, / ^\ s + |\ smatches / and / ^ (\ s +) |\ 1matches / why the matching results are not the same.

/^\s+|\s+$/
/^(\s+)|\1$/

^[A-Z]|\[A-Z]$ 
^([A-Z])|\1$ 

I don"t know where to understand the problem, the problem of symbol priority? Or something else, if anyone can answer, thank you very much.

Mar.02,2021

is really a misunderstanding. For a moment, the reference to the backward reference is not the rule, but the matching content in the rule in the previous grouping.


refers to the content matched by the grouping, not the rules of the grouping

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf17e5-31d8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf17e5-31d8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?