Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Script to remove a block of text from an xml file

$
0
0

I am trying to remove a block of lines from a text file whenever the file changes. The file has start and end tags and I'd like to remove both tags and everything in between. For example, the start and end tags "TrashTag" below and the three lines should be removed if they exist in the file.

< TrashTag >
this goes
remove this
and this


Viewing all articles
Browse latest Browse all 6937

Trending Articles