Identifying records with substrings in rec name

I have a flat file with following data.


COM data data
COMPdata

so I created record definitions for COM adn COMP at same level, when i tetsed the data file against the schema in devleoper I dont get the expected result I should be getting COM and COMP records at the smae level. what i get is COMP as child of COM.

Can anyone please suggest the remedy.