> r = > re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') ... > sre_constants.error: nothing to repeat
The error gives something away (like any good error message should) You're attempting to repeat something that may not exist. In this case, it's the last question-mark. The item before it (\d*) could be empty, and thus have "nothing to repeat". Simply removing the question-mark in question, making it r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*).*' has the same effect as desired (AFAIU) without the error. -tkc -- http://mail.python.org/mailman/listinfo/python-list