does there exist command line utility windows can search text more sophisticated find , findstr? find lines of text contain specified keywords no matter order of words?
for example, if keywords "happily ever after" should find lines containing "ever after happily" , "if ever happens after today, happily embrace it", not "happily together".
type search.txt | findstr /i /r "\<happily\>" | findstr /i /r "\<ever\>" | findstr /i /r "\<after\>"
i used test case...
search.txt:
happily ever after happily ever after blah blah happily ever after happily ever blah after if ever happens after today, happily embrace happily happily ever after happily ever ever after after happily every happily afterwards
and gives output:
happily ever after happily ever after blah blah happily ever after happily ever blah after if ever happens after today, happily embrace
above only.
is needed?
Comments
Post a Comment