Added pattern matching to simres.nametree()