python3 如何原样提取alarm信息

要从log日志中查找alarm 的信息,该如何提取出来原样写到表格里呢,正则表达提取时总是进入死循环,alarm 信息行数是不固定的,明显的区别的部分就是与其他内容多了断线之间的标识。

<HNCS-PS-DPI-SW-XPQ-S9312-CSS>display alarm all
----------------------------------------------------------------------------
Warning      2021-09-03  00:26:44        The "PWR SWITCH_STATE" sensor3 of [C
                                     hassis1/PWR4] detects power is online, bu
                                     t no supply.
Warning      2021-09-03  00:26:44        The "PWR SWITCH_STATE" sensor3 of [C
                                     hassis1/PWR2] detects power is online, bu
                                     t no supply.
Warning      2021-09-03  00:26:42        The "PWR PWR_LACK" sensor2 of [Chass
                                     is1/PWR4] detects a fault.
Warning      2021-09-03  00:26:40        The "PWR PWR_LACK" sensor2 of [Chass
                                     is1/PWR2] detects a fault.
Warning      2021-09-03  00:26:21        The "PWR SWITCH_STATE" sensor3 of [C
                                     hassis2/PWR4] detects power is online, bu
                                     t no supply.
Warning      2021-09-03  00:26:16        The "PWR PWR_LACK" sensor2 of [Chass
                                     is2/PWR4] detects a fault.
Warning      2021-09-03  00:26:14        The "PWR SWITCH_STATE" sensor3 of [C
                                     hassis2/PWR2] detects power is online, bu
                                     t no supply.
Warning      2021-09-03  00:26:11        The "PWR PWR_LACK" sensor2 of [Chass
                                     is2/PWR2] detects a fault.
----------------------------------------------------------------------------   
<HNCS-PS-DPI-SW-XPQ-S9312-CSS>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值