From: 7stud -- Date: 2011-08-20T05:33:15+09:00 Subject: Re: Searching in a directory Yu Yu wrote in post #1017568: > Hello, > I still have problems and need your help! > > I forgot to say that the algorithm should search the next string if the > actual string was found in one .txt file. The reason is that there're > some strings double. > There are string(s?) you are searching for, and their are lines you are searching. It is not clear what you mean by 'next string'. Trying to describe what you want is a waste of time when you can provide a simple example instead. So you need to give an actual example, e.g.: I'm looking for these strings: dog cat in this file: hello world dog hello world cat If dog matches one of the lines, then I want..... -- Posted via http://www.ruby-forum.com/.