摘要 |
A character string processing method and system and a matcher are provided by embodiments of the present invention. The character string processing method includes the following steps. The matcher obtains a to-be-matched character string, which is converted by a manager, from an object library, and obtains a rule, which is set by a resource management device, from a rule library. The matcher parses a bit flag of a matching string of the rule, and when the parsed bit flag is an argument and the argument is in an argument library, adds a first offset to a parsed value of the argument to obtain a matching value. The matcher determines, according to the matching value of the bit flag of the matching string and an actual value of a corresponding bit of the to-be-matched character string, a matching result of the rule and the to-be-matched character string. By performing parsing, offset modification, and mask processing on each bit flag of the matching string of the rule, the character string processing method and system and the matcher reduce the number of the rules required to be used and the matching times, and improve the performance of the system. |