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";
In reply to Re: Merging Two Strings
by Roy Johnson
in thread Merging Two Strings
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |