I need to parse this output :-
S1-link-id eNB-IP-Address MME-IP-Address Facing State ------------------------------------------------------------------- 303 141.1.1.2 191.1.1.2 eNodeB Established 301 141.1.1.2 191.1.1.2 MME Established 306 141.1.1.3 191.1.1.2 eNodeB Established 304 141.1.1.3 191.1.1.2 MME Established 309 141.1.1.4 191.1.1.2 eNodeB Established 307 141.1.1.4 191.1.1.2 MME Established
I want to get multiple values for a single id (first column). For "303" - I need enb,mme ip addresses, facing and state values, same way for other ids.
regex for one desired output :-
\s*(?P<id>\d+)\s+(?P<enb_adr>\d+\.\d+\.\d+\.\d+)\s+(?P<mme_adr>\d+\.\d+\.\d+\.\d+)\s+(?P<facing>\w+)\s+(?P<state>\w+)\s*
Got stuck on how to proceed after this to get desired values for whole output.