Patent ID: 7257576

Claim:
A computer-implemented method of finding a best match to a string of characters from among a plurality of string patterns; comprising: computing a metric value for each of the string patterns so that when the string of characters matches multiple string patterns, the metric values of the string patterns differentiate the quality of the matches; comparing the string of characters to each of the string patterns to determine which string patterns the string of characters matches; selecting from the matching string patterns a matching string pattern as the best match based on the quality of the match as indicated by the computed metric values of the matching string patterns; and storing and reporting the selected matching string pattern, wherein at least one of the string patterns includes at least one wildcard character; wherein computing the metric value of a string pattern further comprises: assigning a prefix value to all characters appearing before the wildcard; assigning a suffix value to all characters appearing after the wildcard; and adding the prefix value to the suffix value to obtain the metric value.