谷歌搜索没有任何帮助,所以我在这里问:如何通过某个字符串的出现来对字符串进行分组?
宠物动物园的示例数据
Name: My little petting zoo CRLF
Owner: Atrotygma CRLF
AverageVisitors: 100 CRLF
PricePerTicket: 5 CRLF
ZooSize: 20 CRLF
Animal: Goat CRLF
Age: 5 CRLF
FavoriteFood: Grass CRLF
Animal: Sheep CRLF
Age: 3 CRLF
Legs: 2 ( + 2 wheels) CRLF
Animal: Dire Wolf CRLF
Name: Puppy CRLF
Size: 20 CRLF
Age: 10.000 CRLF
Classification: Still alive CRLF
目标:应将动物分组在一起(指标:动物),其中每只动物后面都有其(随机、不可预测的)属性(直到下一只动物)。
Name: My little petting zoo
Owner: Atrotygma
AverageVisitors: 100
PricePerTicket: 5
ZooSize: 20
Animal: Key: Goat
Age: 5
FavoriteFood: Grass
Animal: Key: Sheep
Age: 3
Legs: 2 ( + 2 wheels)
Animal: Key: Dire Wolf
Name: Puppy
Size: 20
Age: 10.000
Classification: Still alive
我知道这是一种可怕的数据形式,但它不是我的,我无法对其进行任何更改。