Method for retrieving constant values using regular expressions
AssigneeInternational Business Machines Corporation
InventorSrinivasan Balasubramanian
Life of this patent
Estimating the term…
Abstract
Disclosed is a method of retrieving constant values. The method comprises compiling key-value pairs into a unified regular expression, evaluating the unified regular expression against a transformed input string to match a particular key and extracting the constant value associated with that particular key. The input string in transformed by linking different tags associated with each key-value pair in the unified regular expression into a single linked tag and linking the single linked tag to the input string. Additionally, the method provides for associating the constant value in each key-value pair with an un-fixed key (i.e., a unique regular expression) as opposed to a fixed key, so that different input strings can be matched to the same key.
Claims20
A computer-implemented method of retrieving constant values, said method comprising:
- providing a plurality of key-value pairs, wherein each key-value pair comprises a particular key and a constant value associated with that particular key;
- forming a unified regular expression with said key-value pairs;
- transforming an input string into a transformed input string;
- evaluating said transformed input string against said unified regular expression to identify a match between a single particular key in said unified regular expression and in said transformed input string;
- and
- retrieving a single constant value associated with said single particular key.
A computer-implemented method of retrieving constant values, said method comprising:
- providing a plurality of key-value pairs, wherein each key-value pair comprises a particular key comprising a regular expression and a constant value associated with that particular key;
- forming a unified regular expression with said key-value pairs;
- transforming an input string into a transformed input string;
- evaluating said transformed input string against said unified regular expression to identify a match between a single particular key in said unified regular expression and in said transformed input string;
- and
- retrieving a single constant value associated with said single particular key.
A program storage device readable by computer and tangibly embodying a program of instructions executable by said computer to perform a method of retrieving constant values, said method comprising:
- providing a plurality of key-value pairs, wherein each key-value pair comprises a particular key and a constant value associated with that particular key;
- forming a unified regular expression with said key-value pairs such that each of said key-value pairs has a marker between said particular key and said constant value for said particular key;
- transforming an input string into a transformed input string;
- evaluating said transformed input string against said unified regular expression to identify a match between a single particular key in said unified regular expression and in said transformed input string;
- and
- retrieving a single constant value associated with said single particular key.
The program storage device of claim 21, all the limitations of which are incorporated herein by reference, wherein said method further comprises forming a single linked tag by concatenating said different tag from each of said key value pairs in said unified regular expression and wherein said transforming of said input string comprises linking said input string to said single linked tag.
Dependencies are inferred from the claim text.