Neither of the sequences in your array contain a '!' character, so you won't get any output.
Perhaps your regex should be m/(KR)(?!=P)/g ?
In reply to Re: Bioinformatics: Regex loop, no output
by BrowserUk
in thread Bioinformatics: Regex loop, no output
by TamaDP
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |