I mean that your search pattern GCTTCTTGC only appears once in AGCTTCTTGCGCTTCTT. If you think it appears twice, you are mistaken.
The pos reset is needed in case there are overlapping pattern matches (which is what I've taken your question to be about, despite the sample data). In that case the pos marker needs to be backtracked to one place after the start of the last match to cope with that.
In reply to Re^3: Double check for positions
by hippo
in thread Double check for positions
by bisimen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |