in this sentence if I want to track both IPs, I can scan the sentence until I find the first IP, capture the IP, the scan the sentence until second, all the characters besides the IP can be "discarded" since I do not need it. the following is the lines:
Gateway of last resort is 10.119.254.240 to network 10.140.0.0
O E2 10.110.0.0 [160/5] via 10.119.254.6, 0:01:00, Ethernet2
**D 10.67.10.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2**
O E2 10.68.132.0 [160/5] via 10.119.254.6, 0:00:59, Ethernet2
the regex i have now is : [0-9]+(?:.[0-9]+){3}
this is part of the program to extract IP address that corresponded to it from the string to be used in a different section. the output for the program should be like this:
Protocol: EIGRP
Prefix: 10.67.10.0
AD/Metric:200/128
Next-Hop:10.119.254.244
Last Update:0:02:22
Outbound interface: Ethernet2
my idea is I thought I can extract the IP address and store it in the dictionary to be used later.