Regex quantifier problem with 'branch'