I\'d like a regex that is either X or Y characters long. For example, match a string that is either 8 or 11 characters long. I have currently implemented this like
With Perl, you could do:
my $re = qr/here_is_your_regex_part/; my $full_regex = qr/$re{8}(?:$re{3})?$/