my $t = "my LISTS are always long"; $t =~ /(LIST|OF|LISTS) /; print $1; #LISTS
my $t = "my LISTS are always long"; $t =~ /((LIST|OF)S)/; print $1; #LISTS
In reply to Re: Superfluous options in regex alternations.
by holli
in thread Superfluous subpatterns in regex alternations.
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |