in reply to how to remove characters before and after a search pattern in a string?
my $str = "ACGTTGGCTATTGGGCCCGCT"; my $pattern = "GTT"; my $offset = index($str,$pattern) + length($pattern) + 3; $str = substr($str,$offset); print $str;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to remove characters before and after a search pattern in a string?
by jwkrahn (Abbot) on Mar 03, 2010 at 19:58 UTC |