Extracting data from an array
If i have an array with the following values
Maxi Grande
Maxi Medio
Maxi Piccola
Pillar
Pyramid Medio
Pyramid Picoola
Soft-Foot Medio
Soft-Foot Piccola
These are groups of bags. I need to extract the group name only from each value
So my desired result would be
Maxi
Pillar
Pyramid
Soft-foot
Im thinking i should use eregi function then an if condition. But im sure theres a much easier way of doing this.
Can someone point me in the right direction?
Thanks