|There's no easy way to check if a multi-line text block appears in a file or not ... |
So, the best you can do is to perform one or more tricks. Like Razor says, would it be good to check on the number of lines ? (in other words, can you come to a conclusion ONLY by means of checking the number of lines)
I guess not ... so, what you can also do, is to perfom 6 checks, and only if all checks are OK ...
.... but, then there is no way to tell that those lines are all part of a block. They may be anywhere in the files. But, this depends on the condition, this has got a much better chance of being sort of correct.
If you really need to check if all the lines match, as a block, I would do this :
- find the line number(s) of line nr.1 (of the block) that matches
- for each occurance, advance one line, and check if this line matches line 2 of the block
- repeat (for each occurance still) until line 6
This is basically the way it would be done if there was a tool already, only you will need to write it.