Very unusual one but I'm trying to match output from an SSH session that may collapse view and fall underneath the output required (like a collapsed column)...
Take a look at the example output:
System Id Interface Circuit Id State HoldTime Type PRI
--------------------------------------------------------------------------------
rtr1.lab01.some GE0/0/1 0000000001 Up 22s L2 --
thing
rtr2.lab01.some GE0/0/2 0000000002 Up 24s L2 --
thingelse
I can match the the first line with:
^([a-zA-Z0-9][a-zA-Z0-9.-]+[a-zA-Z0-9])
which returns (rtr1.lab01.some and rtr2.lab01.some) but I'm trying to find the easiest way to match it based on the full hostname (rtr1.lab01.something and rtr2.lab01.somethingelse)
I'm also matching the rest of the output perfectly fine and able to extract the data but really can't find a way to achieve what I'm trying... Can someone point me in the right direction? To expand further (for more context... I'm using the Google TextFSM in Python to match all this data from an SSH session)