A
asaf.peled
I have an XML Editor (Oxygen) that allows regular expressions in its
Find / Replace area.
It accepts Perl 5 regexp which I taught myself the very basics of only
a few days ago.
Anyway I dont know if this is possible or not but it would make my life
1000 times easier if it was.
I have XML that looks like this:
<book>
<title>some title</title>
<chapter/>
</book>
Basically I need to erase entire book chunks whose chapter nodes are
empty. I'm not a programmer otherwise im sure I could write some quick
java to do this in two seconds.
I was playing around with the regexp find/replace in Oxygen and the
best I can do is match the entire <title>some title</title> line with
the following expression: <title>.+<title> But what I need is to match
that entire chunk above. I tried things like
<book>\S+<title>.+</title>\S+<chapter/>\S+</book> OR
<book>[\t\n\r\f\v]*<title> etc..
These dont work.
Does anyone know how to accomplish this?
Thanks for your help!
Find / Replace area.
It accepts Perl 5 regexp which I taught myself the very basics of only
a few days ago.
Anyway I dont know if this is possible or not but it would make my life
1000 times easier if it was.
I have XML that looks like this:
<book>
<title>some title</title>
<chapter/>
</book>
Basically I need to erase entire book chunks whose chapter nodes are
empty. I'm not a programmer otherwise im sure I could write some quick
java to do this in two seconds.
I was playing around with the regexp find/replace in Oxygen and the
best I can do is match the entire <title>some title</title> line with
the following expression: <title>.+<title> But what I need is to match
that entire chunk above. I tried things like
<book>\S+<title>.+</title>\S+<chapter/>\S+</book> OR
<book>[\t\n\r\f\v]*<title> etc..
These dont work.
Does anyone know how to accomplish this?
Thanks for your help!