Longest Substring Match for selecting text in options fields

Implemented Longest Substring Match for selecting text form the options field. Previously, this was done as a full text match. So, tests in which say "Lospalos Warehouse (Warehouse)" is given in the test data and "Lospalos Warehouse" is present in the options field failed.

So, amongst all the possible options, the one which matches maximum will be selected.