What I mean by no match is that not even a single character is common, say "abcd" and "efgh". In cases like these, it will return the first option.

So, if there is no match, it is guranteed that there is no exact match, it simply means that not even a single character is same. 
It is not over engineered, it simply returns that option in which the maximum length of characters match.