There is data:
time timezone 120 time daylight-time-rule Western-Europe ip access-list extended "test" строка строка exit ip access-list extended "test2" строка строка exit ip access-list extended "test3" строка строка exit The task is to parse the block starting from "ip access-list extended" test "" to the line exit
I managed with only one condition, that is, parsing from the ip access-list extended "test" and to the end. Tell me how to make the exit condition on the line "Exit"
Code
with open("File", "r") as file: for line in file: if 'ip access-list extended "from_wifi"' in line: print(file.read())