Description:
We are creating a Paragraph parser. There are variables we want to store inside the paragraph; however, we’re only seeing a way to store the first instance as a variable.
Here’s an example of our command output:
Addresses, Flags: Is-Preferred Is-Primary
Destination: 1.2.3.4, Local: 1.2.3.4, Broadcast: Unspecified, Generation: 1
Addresses, Flags: None
Destination: Unspecified, Local: 1.2.3.4, Broadcast: Unspecified, Generation: 1
Addresses, Flags: Is-Preferred
Destination: 1.2.3.4, Local: 1.2.3.4, Broadcast: Unspecified, Generation: 1
Addresses, Flags: None
Destination: Unspecified, Local: 1.2.3.4, Broadcast: Unspecified, Generation: 1
Question:
Our paragraph identifier starts above with “Logical Interface”. In output we’re sharing (above) we want to store each Address and Destinastion as a variable; however, we want them tied to that logical interface. Would this need to be done through a script (regex compile) or can we iterate over these lines simply using regex? If this is a script...are there any examples of scripting structure we can reference?
Thank you,
djps