Answer the question
In order to leave comments, you need to log in
How to find text in a file?
There is a file in it more than 7,000 lines
How to perform a search in the list
That is, from the beginning it searches one phrase after the machine automatically follows the next, and so all 64 phrases, if it finds something, write it to a separate file
Answer the question
In order to leave comments, you need to log in
A very complex and philosophical question.
First of all, you need to understand what programming language you are going to use to do the simplest line-by-line reading of a file and search by line occurrence.
In c#, for example, you can do something like this:
using (StreamReader streamReader = new StreamReader(this.MyPath))
{
while (streamReader.Peek() > 0)
{
string line = streamReader.ReadLine();
if (line.Contains(Resources.Constants.SpecificString)
{
// Do some action with the string.
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question