I am looking for a script or macro to find 2 text strings like below in a large file:
***2012
Item1
Item
Item3
Line XYZ Bad Note
Item7
Item9
Line XYZ Good Note
Item10
***2012
Item7
Item
Item5
Line XYZ Bad Note
Item6
Item3
Line XYZ Good Note
Item3
I want to find any sections that have both "Line XYZ Bad Note" and "Line XYZ Good Note" and then copy all the sections found into a new file.
In order to define a section each section will always start with ***2012 and I want to to count 8 lines down from the start of the section ***2012 to be included as the section.
Would it also be possible to give me a count of the number of sections it finds that contain those 2 strings?
***2012
Item1
Item
Item3
Line XYZ Bad Note
Item7
Item9
Line XYZ Good Note
Item10
***2012
Item7
Item
Item5
Line XYZ Bad Note
Item6
Item3
Line XYZ Good Note
Item3
I want to find any sections that have both "Line XYZ Bad Note" and "Line XYZ Good Note" and then copy all the sections found into a new file.
In order to define a section each section will always start with ***2012 and I want to to count 8 lines down from the start of the section ***2012 to be included as the section.
Would it also be possible to give me a count of the number of sections it finds that contain those 2 strings?