&{2} could match double ‘&&’ char(in other words – a AND operator), everything goes as my expect. However, [&{2}|\|{2}] will match single ‘&’ or ‘|’ char . How can I do for the case and why the case occur?
&{2} could match double ‘&&’ char(in other words – a AND operator), everything goes
Share
[]is a character group, i.e. “any character within this group.” Special characters do not have any or not the same meaning within it. Use a regular group:If you want it to be non-capturing: