2023-Nov-03-R11.1a
Define a Variable Parser
A Variables Parser parses a single-value variable (such as version number, etc.) by anchoring keywords before and after the variable. Each Variable Line Pattern in a Variable Parser can be used to parse a variable within the full-text range or to parse multiple variables in one line of text.
Applicable Parser Rules for Variable Parser
When to Use a Variable Parser
Use a Variable Parser when certain variables need a programmable check.
Defining a Variable Parser to Parse Version Number
Take the Parser of version number as an example. You can define a Variable Parser to parse version number.
- Retrieve sample text.
- In the Sample area, select the value of version number 12.3(11)T3 and click Add Variable in the context menu.
Tip: You can also select the line of text in the Sample area and click the arrow ( ) to duplicate it as the Variable Line Pattern.
Tip: The system uses the two words before and after 12.3(11)T3 as keywords to generate the line pattern Version $version, RELEASE, using the notional word closest to the variable as the variable name (version in this example). If the word before or after the variable is "is", “was”, “on”, “of”, “with”, “at”, “under”, “for”, “in”, or “:”, the system will look for one word further. - Edit the Variable Line Pattern if necessary. For example, rename the variable.
- To define more variables inside the Variable Parser, repeat the above steps.
- Preview the parsed result of sample text, and click OK to save the Variable Parser.