powershell - Find multiple keywords in a sentence -


i trying search multiple keywords in rather large text document example: need search if regional , new york show in 1 sentence. current script have provides me 1 or other not both.

my current script is:

get-content <file name>.txt | select-string '(phrase)' 

any thoughts?

here how results multiple patterns:

get-content "yourtextfile.txt" | select-string -pattern '(regional.*new york)|(new york.*regional)' 

essentially, looks 2 phrases occur in same line in either order.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -