PowerShell: Deleting entire lines in a text file based on a partial string match

PS C:\workspace> (gc “fileToParse.txt”) -notmatch "<criteria>" | out-file
"resultFile.txt"

Note: <Criteria>, for example, “not".

Leave a Reply

Your email address will not be published. Required fields are marked *