Just a little more difficult:

[Settings]
Categories=name,color,animal
Things=colorRed,colorBlue,colorBrown,nameTeddy,nameRosy,colorWhite,nameRod,animalElephant,animalLion,nameMary,animalPenguin,colorBlack

How two divide the second list using the Categories tokens if I don't know their names (name, color, etc.)?

Well, I suppose I should use two "while" cycles, the first to try each Categories word and the second to extract the relative tokens from the Things list...