Add getElementsByPattern