R12.1-JA-2025June05
Rules for Continuing to Add Variables

Rules for Continuing to Add Variables in Auto Parser

If you have selected words for a line pattern in auto pattern, and continue to select words or texts from the config lines in the left pane of a parser, the system will add variables by following the rules below: 

  • If you continue to select several lines for parsing table from the sample data, a tip message will ask users whether to new a table pattern and save the current pattern. 

  • If you add one for more variables by selecting words in the input area, the variable will be parsed in the current pattern (if the current pattern is multiple mode, the variable will be parsed in the current paragraph). 
  • If the selected variable is in the same line with an existing variable, the system will decide whether to merge the new line pattern to an existing line pattern by the following rules:
    • If the existing variable is parsed by regex, mregex, LineByKeyWord, LineByVariable, LinesByRegex, SelectVariable functions, the new line pattern will not be merged into it.
    • If several existing line patterns of the same line are found, the new line pattern will be merged into the first mergeable existing line pattern.
      Information Note: In multiple mode, if the ID Line is empty or no variables are matched with it, the new variable will be added to the ID Line first.
  • If the added variable is not in the same line with the existing variable, a new line pattern will be generated for this new variable.
  • If there is an empty line pattern, the new variable will be added to it without following the above merging logic.

Rules for Continuing to Add Variables in Add-on Parser

If you continue to add variables after a pattern is confirmed in add-on parser, the system will treat the new variable by followings the general rules below.

  • If several lines are selected to parse variable in table pattern, a tip message will ask users to create a new pattern.

  • If you add one or more variables by selecting words in the input area, the variable will be parsed in the current pattern.
  • If the added variable is in the same line with existing variable, the system will decide whether to merge the line pattern by the following the rules:
    • If the added variable is parsed by regex, mregex, LineByKeyWord, LineByVariable, LinesByRegex, SelectVariable, the variable will not be merged into the line pattern.
    • If only one pattern line is matched, the variable will be merged into this pattern line.
    • If several Var lines are matched, the variable will be merged into the first one.
    • If the parser is a collector parser, the added variable will not be merged. 
  • If the new variable to be added is not in the same line with the existing variable, the variable will be added to an empty pattern line (if exists), or a new line pattern will be generated for this new variable.
  • If there is an empty line pattern, the new variable will be added to it without following the above merging logic.

Apart from the rules set out above, some special rules apply to a specific pattern:

  • In paragraph pattern, when you continue to add variable and the ID Line is empty or no variables matched for it, the new variable will be added to the ID Line first.
  • In table pattern, when users continue to select several lines to Parse Table:
    • When the current table headers are not defined, the new variable will be added to the current table pattern.
    • When the current table headers are defined, a tip message will ask you to create a new table pattern.  

  • In table pattern, when users add variables that are not in table pattern, a tip message will ask you to create a new pattern.