fix bug in regex parser

(seems a bit broken? hope there aren't a ton of these)

fixes #128