Help for this page

Select Code to Download


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