Simplify regex, fixes #1