Understanding negation
Posted: Sun Nov 28, 2010 11:54 pm
I have an XML file from which I want to remove certain tagged elements EXCEPT those elements containing another specific tagged element.
For example:
So all Element:LABEL must be removed unless it contains the Element:SUBLABEL . I tried this with Remove Matching lines, but was not successful. What I read from the Helpfile(latest version 8.6.7) it is not possible to combine negated and non-negated characters. Is this correct? If not, how should I make the remove lines specification?
I can of course write some Jscript to achieve my goal, but a regexp would be more elegant. Thank you for your attention,
Pieter
For example:
Code: Select all
<LABEL>bla bla bla<SUBLABEL>blu blu blu</SUBLABEL>bla bla bla</LABEL>
I can of course write some Jscript to achieve my goal, but a regexp would be more elegant. Thank you for your attention,
Pieter