Bugfix: Generated regex for ? character is incorrect. Closes #494.