in reply to substring selection from a string on certain qualifying conditions

For the first one,

perl -MData::Dumper -le '$_=q[AGRTGAXWXX]; my %match; 1 while m/([ACGT][A-Z]{0,8}[ACGT])(??{$match{$1}++})(*FAIL)/; print Dumper(\%match);' $VAR1 = { 'AGRTG' => 1, 'AG' => 1, 'TG' => 1, 'TGA' => 1, 'AGRT' => 1, 'GA' => 1, 'GRTG' => 1, 'GRT' => 1, 'AGRTGA' => 1, 'GRTGA' => 1 };
  • Comment on Re: substring selection from a string on certain qualifying conditions
  • Download Code