I have two strings.
They are not substrings of each other but there is a overlapping region between them.
my $str1 = "AAAAAAAAAABBBBBBBBCC";
my $str2 = "BBBBBBBBCCZZZZZZZZZZ";
I want to find this overlapping region.
"AAAAAAAAAABBBBBBBBCC"
"BBBBBBBBCCZZZZZZZZZZ"
Overlap is "BBBBBBBBCC"
I searched CPAN and google extensively.
There are many modules about "Edit Distance" Method such as Algorithm::Diff
, Text::Levenshtein
or Text::OverlapFinder
and String::Similarity
.
But, they are not what I am looking for.
String should not be gaped (Insert or Delete any character) or substituted. It's similar to sequence alignment in bioinformatics but without gap "open" and "extension" permission unless in both extremes.
I was wondering if anyone found a solution or a work around yet.