<?xml version="1.0" encoding="windows-1252"?>
<node id="604567" title="Re^7: Search and delete lines based on string matching" created="2007-03-13 11:17:14" updated="2007-03-13 07:17:14">
<type id="11">
note</type>
<author id="502468">
imp</author>
<data>
<field name="doctext">
For deletion you would use this pattern, sorry:
&lt;code&gt;
while (my $line = &lt;$pattern_fh&gt;) {
    chomp $line;
    # Use quotemeta to allow for items like A[0]
    push @tokens, quotemeta($line);
}
my $pattern = '^(?:' . join('|', @tokens) . ')[^a-zA-Z]*$';
print "Search pattern: $pattern\n";
&lt;/code&gt;

</field>
<field name="root_node">
604526</field>
<field name="parent_node">
604564</field>
</data>
</node>
