deals with regex highlighting in autosuggest and dropdownlist:
need to order the strings separated by | by length and desc, otherwise
if we eg, have a appears before anchor in termStr, only 'a' will be
highlighted in "anchor"