I have a file that I am doing search and replace on. I one of the elements that I am to replace is being replaced with an empty string I want to remove the entire line so that the remaining text continues to flow. How do I accomplish this.
Template file
<Name>
<Address1>
<Address2>
<City> <State> <ZIP>
the replacement out put:
My Name
14 Street Name
BO Box 33333
City, TX 88888
if Address2 does not exist I would like it to display as
My Name
14 Street Name
City, TX 88888
However right now the best I can get is
My Name
14 Street Name
City, TX 88888