R12.1-JA-2025June05

End of Paragraph

When there is no end of paragraph defined or matched lines found for the end of the paragraph, the matching scope for variables is the whole paragraph. Single-line rules or regular expressions can define the end of the paragraph. It is not recommended to define variables at the end of the paragraph as they will not be parsed and will be treated as dummy variables.
In order to get the correct last paragraph, the End of Paragraph needs to be defined by using a special character, e.g., “!” in the sample below.
  • When the variable value of End of Paragraph is not defined or not correctly defined, the paragraph ends at the line holding the last matched variable. 
     
  • When the right variable value of "End of Paragraph" is defined, the paragraph ends according to the setting:

Complete the main steps below to define "End of Paragraph" in the following example:

  1. Create a Parser and name it. 
  2. Retrieve the configuration data on device US-BOS-R1.
  3. Double-click the interface name Loopback0 in line to create ID line to parse the variable $intf.

  4. Click Parse Lines, then select the The line between method to parse the variable $intf_config, then click Apply to confirm the settings.

  5. From the pattern menu, select End of Paragraph, then input ! in the End of Paragraph line to correct the parsing scope.

logic of ending a paragraph for linesByvariable and linesByKeyword function:

A new logic of ending a paragraph for linesByvariable and linesByKeyword function is developed: Last paragraph ends with the last line holding any parsed variable for the above two functions.

It is noted that this logic doesn’t impact the variable parsing logic for the paragraph parser in general and only applies to the linebyvariable and linebykeyword functions. If the End of Paragraph is defined, the logic will be ignored.