variable pattern length