Re: regular expression question (re module)

2008-10-16 Thread Philip Semanchuk
On Oct 16, 2008, at 11:25 PM, Steve Holden wrote: Pat wrote: Faheem Mitha wrote: 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 nu

Re: regular expression question (re module)

2008-10-16 Thread Steve Holden
Pat wrote: > Faheem Mitha wrote: >> 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 >> > >> DUKE1_plat

Re: regular expression question (re module)

2008-10-16 Thread Pat
Faheem Mitha wrote: 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 DUKE1_plateD_A12.CEL. Thanks in advance. Please cc

Re: regular expression question (re module)

2008-10-11 Thread bearophileHUGS
Faheem Mitha: > I need to match a string of the form > ... Please, show the code you have written so far, with your input-output examples included (as doctests, for example), and we can try to find ways to help you remove the bugs you have. Bye, bearophile -- http://mail.python.org/mailman/listin

regular expression question (re module)

2008-10-11 Thread Faheem Mitha
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 DUKE1_plateD_A1.CEL, but not any of DUKE1_pla