Added regexes, working version.