what is the best way to find on which line certain string is on? I know I could iterate though all of the lines, but the catch is that the string being searched might be multiline. Would this be solvable by regex for example?
Thanks
what is the best way to find on which line certain string is on?
Share
It’s solvable. First search for the pattern where all the lines are searched at once separated, for example with
\n‘s. Then count the number of\n‘s before it.