Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl>perl -wMstrict -le
    "my $s = 'XXXxxxTGAxxTGAxxxxxxx';
    ...
    trying a match at offset 10
    trying a match at offset 11
    matched TGA beginning at offset 11
    
  2. or download this
    c:\@Work\Perl>perl -wMstrict -le
    "my $s = 'XXXxxxTGAxxTGAxxxxxxx';
    ...
    trying a match at offset 0
    matched TGA beginning at offset 6
    trying a match at offset 9
    
  3. or download this
    my $s = 'XXXxxxTGAxxTGAxxxxxxx';
    while ($s =~ m{ (?{ print qq{trying a match at offset }, pos $s }) (?:
    + \w\w\w)*? (TGA) }xmsg) {
      print qq{matched TGA beginning at offset $-[1]};
      }
    
  4. or download this
    c:\@Work\Perl>perl -wMstrict -le
    "my $s = 'XXXxxxTGAxxTGAxxxxTGAxx';
    ...
    matched TGA beginning at offset 6
    trying a match at offset 9
    matched TGA beginning at offset 18