-- simplified the regex for finding the branches