I have a string like this:
house1- a normal house
house2-an office
house3-a scholl
There are about 2000 lines. I want to get only house1,house2,house3 etc. from that it and put it in another file. Like:
house1
house2
house3
I understand that the explode function works for separating strings, but how can I do this?