Lines Matching +full:escape +full:- +full:string +full:- +full:regexp
2 """Classes to parse mailer-daemon messages."""
54 ('----- The following addresses had permanent fatal errors -----\n',
59 '------- Failure Reasons --------\n\n(?P<reason>.*)\n(?P<email>.*)',
63 '^Original-Recipient: rfc822;(?P<email>.*)',
70 # compile the re's in the list and store them in-place.
86 # if a string, "<>" is replaced by a copy of the email address.
94 re.compile('^Diagnostic-Code: (?P<reason>.*)', re.MULTILINE),
107 for regexp in emparse_list_list:
108 if type(regexp) is type(()):
109 res = regexp[0].search(data, 0, from_index)
116 res = regexp[1].match(data, res.end(0), from_index)
122 res = regexp.search(data, 0, from_index)
136 for regexp in emparse_list_reason:
137 if type(regexp) is type(''):
138 for i in range(len(emails)-1,-1,-1):
140 exp = re.compile(re.escape(email).join(regexp.split('<>')), re.MULTILINE)
146 res = regexp.search(data)
160 return -1
168 pat = re.compile('^[0-9]*$')
183 print('%s\t%-40s\t'%(fn, sender[1]), end=' ')
223 print('--------------')
224 print(nok, 'files parsed,',nwarn,'files warning-only,', end=' ')
226 print('--------------')
232 print('%d %s - %s\t%s' % (num, first, last, e))
236 if len(sys.argv) > 1 and sys.argv[1] == '-d':