''' Created on 13 dec. 2016 @author: olivier.massot ''' import re CMP_IGNORE_LINES = [""] line = """""" # 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