added an option to restrict branches by regex