Micro-optimize some regexes