Allow branches to be filtered by regexp.

Regexes need to be strings to prevent them form being executed on the command line.