| 	
		 From: Simon Brunning on 4 Nov 2009 12:18 2009/11/4 Nadav Chernin <Nadav.C(a)qualisystems.com>: > No, I need all files except exe|dll|ocx|py not re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) Now that wasn't so hard, was it? ;-) -- Cheers, Simon B. 	
		 From: Dave Angel on 4 Nov 2009 16:03 Simon Brunning wrote: > 2009/11/4 Nadav Chernin <Nadav.C(a)qualisystems.com>: > >> Thanks, but my question is how to write the regex. >> > > re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) works for me. > > How about: os.path.splitext(x)[1] in (".exe", ".dll", ".ocx", ".py"): DaveA 
		 First
 | 
Prev
 | 
 Pages: 1 2 Prev: How to test urllib|urllib2-using code? Next: 2to3 on Mac - unknown encoding: mbcs |