Newbie regular expression ?

jepler at unpythonic.net jepler at unpythonic.net
Tue Oct 4 14:44:54 EDT 2005


Here are two ideas that come to mind:
files = glob.glob("UNQ*.dat") + glob.glob("Unq*.dat") + glob.glob("unq.dat")

files = [f for f in glob.glob("*.dat") if f[:3] in ("UNQ", "Unq", "unq")]

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051004/d9f23c23/attachment.sig>


More information about the Python-list mailing list