james_027 wrote: > hi, > > how do I regex that could check on any of the value that match any one > of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', > 'sep', 'oct', 'nov', 'dec' > > Thanks
>>> patr = re.compile('jan|feb|mar|apr|may|jun|jul|aug|sep|nov|oct|dec') >>> patr.match("jul") <_sre.SRE_Match object at 0x7ff28ad8> >>> patr.match("nosuch") >>> regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Sorry, the dog ate my .sigline -- http://mail.python.org/mailman/listinfo/python-list