我正在使用Python中的regex库。我正在创建一个条件,我想绕过下面的示例字符串,因为我逐行读取一个文件。你知道吗
如果找到如下格式,我想绕过字符串:
03/27/2016 07:58:17.442
要绕过的示例字符串:
03/27/2016 07:58:17.442 U:Event: Current Process Recipe Name = PFCA-800Pulse.prc [LLA_01] [2016-03-27_003_A1B]
我的当前代码:
self.matchObj = re.match( r'([0-9])\w+', l)
if not self.matchObj:
#do the following code here
试试这个:
https://regex101.com/r/kAsQUn/1
根据评论编辑:
https://regex101.com/r/kAsQUn/2
相关问题 更多 >
编程相关推荐