Index: _strptime.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v retrieving revision 1.23.4.4 diff -u -r1.23.4.4 _strptime.py --- _strptime.py 29 Aug 2003 02:34:22 -0000 1.23.4.4 +++ _strptime.py 5 Oct 2004 18:02:10 -0000 @@ -18,6 +18,7 @@ import calendar from re import compile as re_compile from re import IGNORECASE +from re import escape as re_escape from datetime import date as datetime_date __author__ = "Brett Cannon" @@ -367,7 +368,7 @@ else: return '' to_convert.sort(sorter) - regex = '|'.join(to_convert) + regex = '|'.join([re_escape(stuff) for stuff in to_convert]) regex = '(?P<%s>%s' % (directive, regex) return '%s)' % regex