First, I am new to regular expressions.
I have an XML File that is formatted as so:
<SCHED_TABLE LAST_UPLOAD="" ... TABLE_NAME="">
<JOB
APPLICATION=""
...
NODEID="foo"
...
>
</JOB>
<JOB
APPLICATION=""
...
NODEID="bar"
...
>
</JOB>
</SCHED_TABLE>
With a whole lot of lines in between. What I need to do is write a regular expression to find all the JOB's where NODEID != foo. Those that do NOT equal foo will be replaced with a blank, therefore deleting those jobs. The whole job needs to be deleted including the open and close JOB tag.
Any advice for this?