in reply to parsing multiple lines

Wouldn't it be easier to use their API?
http://www.genome.jp/kegg/soap/

You just need to use SOAP lite to handle their KEGG.wsdl file and retrieve the exact information you want directly from their database.

It's well documented and has several examples on how to use.

Writing the parser is of course a nice exercise but you should be aware that they change their output from time to time and therefore your parser might eventualy break.