Hi all,
I have a little problem - hopefully just a little on - and maybe you guys can help me there. I need a regular expression that generates this result:
Input
13: br-eth4: mac 94:57:a5:51:cf:0f
14: bond0: mac 94:57:a5:51:cf:0c
15: br-bond0: mac 94:57:a5:51:cf:0c inet 100.99.2.67/27 br-bond0
16: bond2: mac 3c:fd:fe:9d:02:19
17: bond1: mac 3c:fd:fe:9d:02:2c
290: tapf13149d2-f7: mac b6:34:56:72:95:2a
312: tap8b7a9959-7d: mac 0e:86:c0:d4:d6:71
321: tapb3d33379-43: mac 02:c4:37:b6:34:7c
65: tap8e3df1fe-73: mac 6a:5b:48:81:45:9f
322: tapbee658e5-c9: mac 9a:02:b4:9f:6f:9c
Intented output:
13: br-eth4: mac 94:57:a5:51:cf:0f
14: bond0: mac 94:57:a5:51:cf:0c
15: br-bond0: mac 94:57:a5:51:cf:0c inet 100.99.2.67/27 br-bond0
16: bond2: mac 3c:fd:fe:9d:02:19
17: bond1: mac 3c:fd:fe:9d:02:2c
290: tapf13149d2-f7: mac b6:34:56:72:95:2a
312: tap8b7a9959-7d: mac 0e:86:c0:d4:d6:71
321: tapb3d33379-43: mac 02:c4:37:b6:34:7c
65: tap8e3df1fe-73: mac 6a:5b:48:81:45:9f
322: tapbee658e5-c9: mac 9a:02:b4:9f:6f:9c
I have no trouble with recognizing the number and string fields. My only trouble is to handle the variable length of white spaces in the output. Input side is always four white spaces, but output is the problem.