Newbie regular expression ?

jepler at jepler at
Tue Oct 4 20:44:54 CEST 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")]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list