- or download this
/^(.{4}).*\1$/ # ^ and $ match beginning and end of string respect
+ively
- or download this
/^(.{4}).*\1.*\1$/
- or download this
ABCD # pattern
...
ABED # match
BBCD # match
ABC # no match
- or download this
sub makepattern
{
...
my $imprecisematch = "ABCD";
my $pattern = makepattern( $imprecisematch );
/^($pattern).*\1.*\1$/ #match $_ against three occurrences of this
+ pattern