I would like get all lines start with space
Sample of initial text:
!
line con 0
session-timeout 5
exec-timeout 5 0
password 7 1239211A43054F0202D1D
transport output none
line 2
no activation-character
no exec
transport preferred none
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
session-timeout 5
access-class 125 in
exec-timeout 5 0
length 0
transport input ssh
transport output none
Result must be:
line con 0
session-timeout 5
exec-timeout 5 0
password 7 1239211A43054FB202D1D
transport output none
I tried something in Python
result = re.findall('line\scon(?s).*?(?=^\w)', str(abovetext))