Miscellaneous fixes to regexes