Created
May 6, 2013 01:35
-
-
Save marioidival/5522895 to your computer and use it in GitHub Desktop.
XD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def validator(files): | |
pattern = {1: r'',2:r'',3: r'', 4: r'',5: r'',6: r'',7: r'',8: r'',9: r'',10: r'',11: r''} | |
filex = open(files) | |
gen_files = (lists in for lists in filex.readlines()) | |
for gen_list in gen_files: | |
one_list = gen_list.split(";") | |
for pattern_field, list_field in zip(pattern.itervalues(), | |
one_list.itervalues()): | |
result = re.match(str(pattern_field), str(list_field)) | |
if not result is None: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment