prune redundant * in pattern