Made minor fixes to regexs.