I searched a lot but I didnt find answers which would suit what I am looking for so I am posting this question.
I want to extract the first occurance of 'par','comp' 'order' and 'nameprefix'. How to do this for the example input? Is there any perl oneliners to do it?
wertydhhdbc->auCdl = '( nil
par (xyz)
comp asd1
order (done)
namePrefix "X"
par (xyz)
comp asd
order (done)
namePrefix "R"
namePrefix "X"
par (qwer)
comp key
order (done)
namePrefix "X"
comp key
order (done )
par (qwer)
order (done)