Added implementation of regexes however does not solve the star problem