-P: also check if the tag matches, only then it should get printed.