Hi Kyle, one more question. How can I adapt your solution for full word matching (i.e. with spaces as boundaries), although the solution works very well for partial matching? Nice thing about the solution is that I could have a matching preference order between single words and phrases by sorting them according to their length in the 'phrases' array. Thanks a lot.