简体   繁体   中英

In Notepad++, how to search for a pair of strings in a file that are separated by multiples lines?

I have a file in Notepad++ that reads with repeating sections like this:

something here xx
something here xxx
INS*Y*D3*60
something here x
something here xx
something here xxx
something here xxxx
something here xxxxx
DTP*349*17
something here...

I want to be able to do a search to find all of the instances where the

 INS*Y 

and

 DTP*349 

appear as a pair of strings separated by unique rows of strings, skipping the string that ends the INS*Y row plus skipping all of the strings on the rows in between (which all contain unique information).

I have a file in Notepad++ that reads with repeating sections like this:

something here xx
something here xxx
INS*Y*D3*60
something here x
something here xx
something here xxx
something here xxxx
something here xxxxx
DTP*349*17
something here...

I want to be able to do a search to find all of the instances where the

 INS*Y 

and

 DTP*349 

appear as a pair of strings separated by unique rows of strings, skipping the string that ends the INS*Y row plus skipping all of the strings on the rows in between (which all contain unique information).

I have a file in Notepad++ that reads with repeating sections like this:

something here xx
something here xxx
INS*Y*D3*60
something here x
something here xx
something here xxx
something here xxxx
something here xxxxx
DTP*349*17
something here...

I want to be able to do a search to find all of the instances where the

 INS*Y 

and

 DTP*349 

appear as a pair of strings separated by unique rows of strings, skipping the string that ends the INS*Y row plus skipping all of the strings on the rows in between (which all contain unique information).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM