fix regex patterns, fixes #16