in reply to Merging Two Strings
Make the + a {2,} to specify 2 or more character minimum overlap.my $str3 = 'ATGATG'; my $str4 = 'ATGATG'; my $catted = "$str3 $str4"; $catted =~ s/(.*)(.+) (?=\2)/$1/; print "$catted\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Merging Two Strings
by sauoq (Abbot) on Oct 27, 2005 at 15:59 UTC | |
by Roy Johnson (Monsignor) on Oct 27, 2005 at 16:24 UTC | |
by GrandFather (Saint) on Oct 27, 2005 at 19:43 UTC | |
by Roy Johnson (Monsignor) on Oct 27, 2005 at 19:47 UTC | |
by sauoq (Abbot) on Oct 27, 2005 at 21:49 UTC |