Fix grep() to deal with attribute order and numbers.