Give up

No, really: my boss ended up writing a perl script to do the job, so this just processes the output.