add seek_to_pattern() helper