updated regexps to fix a broken match