From: Stefano Crocco Date: 2007-09-20T06:39:32+09:00 Subject: Re: YAML & readlines & modify text files Alle mercoled� 19 settembre 2007, Dan George ha scritto: > CATEG being another line inside the text files... and the problem > might be because the Name-line isn't always above the Link-line. I > could have n lines between or below, what I'm trying to say is that I > don't know where the Name-line is inside the texts files. This changes everything. I assumed (according to the example lines you posted) that each Link-line had the corresponding Name-line above it. But, if there isn't a relation between the position of the two kind of lines, how can you know what to put in the link line? I mean, what is the relation which connects a Link-line and the corresponding Name-line? Since (from what you say now) the position of the two kind of lines are random (as far as this problem is concerned, at any rate) are you able, given a single Link-line, to understand which is the corresponding Name-line? If yes, how? Whithout knowing this, I can't help you. Stefano