use regex to match hg branch