change order of regexes to match order they are used in