You can use the look ahead assertion (found in Extended Patterns), which makes perl search for a pattern and return to the previous position after the match (and /g doesn't allow perl to match exactly at the same position, so it will move by at least one char on the next attempt).
($myseq =~ /(?=AA)/gi ), or (?=(AA)) if you want to capture the matches (which isn't really useful when the pattern is AA).
In reply to Re: Identifying Overlapping Matches in Nucleotide Sequence
by Eily
in thread Identifying Overlapping Matches in Nucleotide Sequence
by FIJI42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |