Thank you so much for your help, I works perfectly. If I understand your script correctly, you are setting the line delimiter to a ";" and replacing all multiple spaces to single spaces?
I have parsed the netlist using verilog-perl, but the time requirement seems to increase exponentially with number of cells. For older netlists with ~5k cells, the script takes about 12 hours. With my new netlist of about 450000 cells, I'm estimating a runtime of about 200 days which is unacceptable so I'm looking at alternative approaches.