Created
August 17, 2012 15:39
-
-
Save jbarratt/3379994 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import re | |
filelist = ["foo.txt", "__foo.html", "bar.txt", "__bar.html", "baz.mp3"] | |
matchfiles = [i for i in filelist if i.startswith("__")] | |
matchre = [i for i in filelist if re.search('o+', i)] | |
print matchfiles | |
print matchre |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment