fix auto-mode regular expressions