in reply to Re^3: phrase match
in thread phrase match

I was just experimenting a few more things.

Experimentation is good!

... my 'phrase list' would be in the decreasing order of phrase string length.

If you do a  reverse sort on the phrase list or array the job is done, and you don't have to worry any more about order of insertion when adding new phrases. See example in Re^3: phrase match, para 5.