I have a string containing a hierarchy of items separated by a '/' character.
E.g. Class\Order\Family\Genus\Species
I need to split out this string such that each value is its own column as well as displaying the original full string
E.g.
Mammalia\Carnivora\Felidae\Panthera\Panthera tigris
Mammalia\Carnivora\Felidae\Panthera\Panthera leo
Mammalia\Carnivora\Felidae\Panthera\Panthera pardus
becomes
Classification Class Order Family Genus Species
-------------- ----- ----- ------ ----- -------
Mammalia\Carnivora\Felidae\Panthera\tigris Mammalia Carnivora Felidae Pathera tigris
Mammalia\Carnivora\Felidae\Panthera\leo Mammalia Carnivora Felidae Pathera leo
Mammalia\Carnivora\Felidae\Panthera\pardus Mammalia Carnivora Felidae Pathera pardus
Finally, not all string will have 5 values so the script will need to enter NULL for values that don't exist
E.g.
Mammalia\Carnivora\Felidae
becomes
Classification Class Order Family Genus Species
Mammalia\Carnivora\Felidae Mammalia Carnivora Felidae NULL NULL