Yes, (if I'd got the function name right), just add an ajStrClean(&buffer); after each of the "line++" lines. You can tell its not one of mine..... I'd have used "++line" .... not that it matters. Alan