<?xml version="1.0" encoding="windows-1252"?>
<node id="7769" title="How do I match for several strings, matching the longest stringfirst?" created="2000-04-16 15:42:32" updated="2005-08-14 10:02:38">
<type id="1857">
categorized question</type>
<author id="11732">
QandAEditors</author>
<data>
<field name="doctext">
The following is a excerpt of text file:
&lt;code&gt;
right lymph node
lymph fluid
&lt;/code&gt;
how would i match for the longest string first, then shorter string
in the example of above i would want my program to print out lymph node as the tissue type in line 1 but lymph in line 2
i have a table of relevant terms to match to, but there are separate entries for lymph and lymph node 

</field>
<field name="parent_node">
1835</field>
</data>
</node>
