| 12345678910111213141516171819202122232425262728 |
- '''
- Created on 13 dec. 2016
- @author: olivier.massot
- '''
- import re
- CMP_IGNORE_LINES = ["<dataroot xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" generated=\"\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\">"]
- line = """<dataroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated="2016-12-13T10:46:21">"""
- # print(re.match(CMP_IGNORE_LINES[0], str(line)))
- with open(r"C:\dev\access\OpenAccess\tests\reference\source\tables\TableTestAdvancedFields.xml", "rb") as source_file:
- count= 0
- for line in source_file:
- count += 1
- if count == 198:
- print(line)
- print(str(line))
- ignore = False
- for ignore_regex in CMP_IGNORE_LINES:
- if re.match(ignore_regex, str(line)) != None:
- print(line)
- ignore = True
-
|