Delete multiple lines in a text file using Powershell
问题 I have a text file like below: [Option] DuplicateUncoveredDiff = 1 KeptPatternMaxCount = 7 [6107] CtrlFlag = 10 Version =1532 [6900] CtrlFlag = 10 Version =1532 ...and some more text here I am trying to find a way to delete multiple lines under a group. When I say group, I am referring to the strings inside [ ] brackets and whatever is under it. For example, this is Group 1: [Option] DuplicateUncoveredDiff = 1 KeptPatternMaxCount = 7 Group 2: [6107] CtrlFlag = 10 Version =1532 Is there a way