Consider a file with content like this :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<FileZilla3>
<RecentServers>
<Server>
<Host>10.16.103.58</Host>
<Port>22</Port>
<Protocol>1</Protocol>
<Type>0</Type>
<User>mapfre</User>
<Pass>Adelaide123?</Pass>
<Logontype>1</Logontype>
<TimezoneOffset>0</TimezoneOffset>
<PasvMode>MODE_DEFAULT</PasvMode>
<MaximumMultipleConnections>0</MaximumMultipleConnections>
<EncodingType>Auto</EncodingType>
<BypassProxy>0</BypassProxy>
</Server>
<xxxxxxx>
I want to match the string "<Host>10.16.103.58</Host>" and delete all lines till </server> and one line above the string match along with the current line. The final output should be like this
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<FileZilla3>
<RecentServers>
<xxxxxxx>
I am looking for a good solution asap. Can someone help me with this here ??