Using regexes because some of the rules don't work