开发者

how to write regex for below format using python

开发者 https://www.devze.com 2022-12-10 04:45 出处:网络
I want to validate below data using regex and python. Below is the dump of the data which Can be stored in string variable

I want to validate below data using regex and python.

Below is the dump of the data which Can be stored in string variable

Start 0  .......... group=..... name=...... number=.... end=(digits)
Start 1  .......... group=..... name=...... number=.... end=(digits)
Start 2  .......... group=..... name=...... number=.... end=(digits)
Start 3  .......... group=..... name=...... number=.... end=(digits)

Where ......is some random data need not to validate
...
..

Start 100  .......... group=..... name=...... number=.... end=(dig开发者_StackOverflow社区its)

Thanks in advance


You could use r'(Start \d+.*?group=.*?name=.*?number=.*?end=\d+)*'.

0

精彩评论

暂无评论...
验证码 换一张
取 消