Pattern generator fixes

Pattern generator is not interpreting some patterns correctly; lower
case character patterns in particular.
Merge branch 'BUGFIX_PatternGeneratorFixes'