in reply to substrings that consist of repeating characters
use strict; use warnings; my $string = "AAAAAAATTTAGTTCTTAAGGCTGACATCGGTTTACGTCAGCGTTACCCCCCAAGT +TTTTTTTTTTTTTTTTTATTGGGGACTTT"; my $len = 0; my $best = ""; while ($string =~ /((.)\2{$len,})/g) { $len = length $1; $best = $1 } print "best: $best\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: substrings that consist of repeating characters
by GrandFather (Saint) on Sep 28, 2020 at 22:17 UTC | |
|
Re^2: substrings that consist of repeating characters
by salva (Canon) on Sep 29, 2020 at 09:26 UTC | |
by AnomalousMonk (Archbishop) on Sep 29, 2020 at 17:37 UTC | |
by salva (Canon) on Sep 29, 2020 at 20:59 UTC | |
by choroba (Cardinal) on Sep 29, 2020 at 21:20 UTC | |
by salva (Canon) on Sep 30, 2020 at 07:32 UTC |