Fix issue with scanning regular expressions

Since both / and /= are tokens that may start the regular expression we need to go back one or two characters respectively.

Fixes #326.