regular expression question (re module)

Faheem Mitha faheem at email.unc.edu
Sat Oct 11 16:30:24 EDT 2008


Hi,

I need to match a string of the form

capital_letter underscore capital_letter number

against a string of the form

anything capital_letter underscore capital_letter number
some_stuff_not_starting with a number

Eg D_A1 needs to match with DUKE00001_plateD_A1.CEL, but not any of
DUKE00001_plateD_A10.CEL, Duke00001_PlateD_A11v2.CEL,
DUKE00001_plateD_A12.CEL.

Similarly D_A10 needs to match DUKE00001_plateD_A10.CEL, but not any
of DUKE00001_plateD_A1.CEL, Duke00001_PlateD_A11v2.CEL,
DUKE00001_plateD_A12.CEL.

Similarly D_A11 needs to match Duke00001_PlateD_A11v2.CEL, but not any
of DUKE00001_plateD_A1.CEL, DUKE00001_plateD_A10.CEL,
DUKE00001_plateD_A12.CEL.

Thanks in advance. Please cc me with any reply. 
                                                                Faheem.
    



More information about the Python-list mailing list