Trying to use a python split on a "empty" newline but not any other new lines. I tried a few other example I found but none of them seem to work.
Data example:
(*,224.0.0.0/4) RPF nbr: 96.34.35.36 Flags: C RPF P
Up: 1w6d
(*,224.0.0.0/24) Flags: D P
Up: 1w6d
(*,224.0.1.39) Flags: S P
Up: 1w6d
(96.34.246.55,224.0.1.39) RPF nbr: 96.34.35.36 Flags: RPF
Up: 1w5d
Incoming Interface List
Bundle-Ether434 Flags: F A, Up: 1w5d
Outgoing Interface List
BVI100 Flags: F, Up: 1w5d
TenGigE0/0/0/3 Flags: F, Up: 1w5d
TenGigE0/0/1/1 Flags: F, Up: 1w5d
TenGigE0/0/1/2 Flags: F, Up: 1w5d
TenGigE0/0/1/3 Flags: F, Up: 1w5d
TenGigE0/1/1/1 Flags: F, Up: 1w5d
TenGigE0/1/1/2 Flags: F, Up: 1w5d
TenGigE0/2/1/0 Flags: F, Up: 1w5d
TenGigE0/2/1/1 Flags: F, Up: 1w5d
TenGigE0/2/1/2 Flags: F, Up: 1w5d
Bundle-Ether234 (0/3/CPU0) Flags: F, Up: 3d16h
Bundle-Ether434 Flags: F A, Up: 1w5d
I want to split on anything that is a new line online and only a newline.
Example code is below:
myarray = []
myarray = output.split("\n")
for line in myarray:
print line
print "Next Line"
I am do have the "re" library imported.