DETERMINING BEST MATCH AMONG A PLURALITY OF PATTERN RULES USING WILDCARDS WITH A TEXT STRING
A method for creating and operating a database for determining the best match of a plurality of rules comprising wildcards and character strings with an input text string.
1 . A method comprising the following processes:
selecting a pattern rule which comprises a prefix key comprising a string of characters preceding a wildcard and categorizing it as a prefix rule;
comparing an input text string with all pattern rules having a matching prefix key and selecting a rule having the longest prefix key; and
setting the policy of the rule.
2 . The method of claim one further comprising the processes:
selecting a pattern rule which comprises a suffix key comprising a string of characters succeeding a wildcard and categorizing it as a suffix rule;
comparing an input text string with all pattern rules having a matching suffix key and selecting a rule having the longest suffix key; and
setting the policy of the rule.
3 . The method of claim two further comprising the processes:
selecting a rule which does not contain a wildcard and categorizing it as a unique rule;
comparing all unique rules with an input text string and selecting a rule having an exact match;
setting a policy specified by unique rules which match; and
setting a default policy specified by default rules.
4 . An article of manufacture comprising a computer usable medium tangibly embodying a program product adapted to control a computing system having encoded instructions to compare prefix strings and suffix strings in rules with input text.