Usuń tagi XML za pomocą narzędzi Regex
Oto fragment mojego pliku XML
<layoutItems>
<behavior>Edit</behavior>
<field>ID</field>
</layoutItems>
<layoutItems>
<page>lastViewedAccount</page>
<showLabel>false</showLabel>
<showScrollbars>false</showScrollbars>
<width>100%</width>
</layoutItems>
<layoutItems>
<behavior>Required</behavior>
<field>Name</field>
</layoutItems>
Chcę usunąć sekcję na środku, tj.
<layoutItems>
<page>lastViewedAccount</page>
<showLabel>false</showLabel>
<showScrollbars>false</showScrollbars>
<width>100%</width>
</layoutItems>
Ta sekcja może pojawić się w dowolnym miejscu pliku wraz z innymi tagami.
Jaki jest najlepszy sposób na usunięcie jakiegoś narzędzia do manipulacji ciągiem? Próbowałem szczęścia zsed
ale bez powodzenia. Każda pomoc będzie mile widziana.