That option can match any time the regex engine has picked the first one but is forced to backtrack into the alternation. gaal gave you one example. Here are some artificial ones where the LIST option will never match but the LISTS one may:
/ (LIST|OF|LISTS) (?!S) /x / (LIST|OF|LISTS) (?(?{ $+ eq "LIST" }) (?!) ) /x
Makeshifts last the longest.
In reply to Re: Superfluous options in regex alternations.
by Aristotle
in thread Superfluous subpatterns in regex alternations.
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |