From: Paul Lutus Date: 2006-09-15T09:45:55+09:00 Subject: Re: Need help about Ruby with text file Mike Durham wrote: / ... >>> 2)I get the result like :- >>> hh >> >> Please explain the circumstances under which you want to get this result. >> > He said the text is "in a file" I generally don't require newbies to create and then read a file for demonstration purposes. I prefer my examples to run exactly as posted. This avoids the otherwise inevitable "I tried it and it didn't work!"" replies. What this means is the OP needs to explain the circumstances under which he wants two "h" character in a row, clearly and unambiguously. Before, after, and in between. And now, on re-reading his first post, I can't tell whether he got that result and didn't want it, or didn't get it and wanted it. Or ... got it and wanted it, and thought he would mention it in passing. -- Paul Lutus http://www.arachnoid.com