Finding all pattern occurrences