Python正则表达式引用子组匹配有数量限制?
PHPz
PHPz 2017-04-18 10:11:42
0
2
365
PHPz
PHPz

学习是最好的投资!

reply all(2)
刘奇

Because 10 不是 00.

The content in your second capture group is 00,当然就不匹配 10 了。引用捕获组的时候,要求此处和指定组是相同的文本,而不是它们符合相同的模式。比如 (.)1 Matches two consecutive identical characters.

迷茫

Shouldn’t 00:00:00,000 and 00:00:10:000 just use the same pattern?
I have run the following pattern on both the website and the Python script you gave me, and it can match.

(\d{1,3})\n(\d{2}):(\d{2}):(\d{2}),(\d{3}) --> (\d{2}):(\d{2}):(\d{2}),(\d{3})
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template