Microsoft Windows [版本 10.0.17134.167]
(c) 2018 Microsoft Corporation。保留所有权利。
C:\Users\WHY>type E:\test\a.txt
ab cd efgh N OL
ab ce efgh N OP
ab cd efgh N OP
C:\Users\WHY>type E:\test\a.txt | findstr /r /i /c:"^ab cd.*N OP$"
ab cd efgh N OP
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>type D:\Test\1.txt
ab cd efgh N OL
ab ce efgh N OP
ab cd efgh N OP
C:\Users\Administrator>type D:\test\1.txt | findstr /r /i /c:"^ab cd.*N OP$"
ab cd efgh N OP