my $str = "ACGTTGGCTATTGGGCCCGCT"; my $pattern = "GTT"; my $offset = index($str,$pattern) + length($pattern) + 3; $str = substr($str,$offset); print $str;
In reply to Re: how to remove characters before and after a search pattern in a string?
by thunders
in thread how to remove characters before and after a search pattern in a string?
by BhariD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |