Newbie regular expression ?

len lsumnler at gmail.com
Tue Oct 4 14:32:59 EDT 2005


I have the following statement and it works fine;

    list1 = glob.glob('*.dat')

however I now have an additional requirement the the string must begin
with
any form of "UNQ,Unq,unq,..."

as an example if I had the following four files in the directory:

unq123abc.dat
xy4223.dat
myfile.dat
UNQxyc123489-24.dat

only unq123abc.dat and UNQxyc123489-24.dat would be selected

I have read through the documentation and I am now sooooo
confussedddddd!!

Len Sumnler




More information about the Python-list mailing list