Improve parsing regexps