Parent Line is an optional line pattern that can be added in a paragraph parser to parse parent instance variables for paragraphs that have been identified by ID Line Pattern. Inside each paragraph, the system looks for text lines that can match the defined parent line pattern, upward from the line of ID Line A. If there are variables defined in the parent line pattern, the system parses and uses them as table columns.

For example, the output of the show ospf neighbor detail command from a Cisco XR device has nested paragraphs for OSPF neighbors belonging to each OSPF process, and the process ID is a key variable that needs to be parsed.

To support such cases, set a parent line as follows:

1.In the Variable Definition area, click Add Parent Line.

2.Select the target line of text in the Sample area, and click the arrow to duplicate it in the Parent Line field.

3.Define the variable of OSPF process ID by replacing OSPF1 with $process_id.

Using Regex to Parse Parent Line from Multiple Lines of Text

If the target Parent Line contains multiple lines of text, for example, the parent line of the following raw text contains two lines of text, including interface name and service policy input, you can use Regex Pattern to define the Parent Line.