You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
358 B

2 days ago
# -*- coding: utf-8 -*-
import re
c = open(r'E:\code\crm-api-docs\A4 客户管理\A4-5 联系人\编辑联系人.bru', encoding='utf-8').read()
m4 = r'(\| 参数 \| 类型 \| 必填 \| 说明 \|\n\s*\|[ :|-]+\n)'
m = re.search(m4, c)
print('m4:', bool(m))
if m:
print(repr(m.group(0)))
i = c.find('参数 | 类型')
print('context:', repr(c[i-30:i+80]))