Would be nice to simplify the regexes if possible at all and share them between cellar/prefix.