Re: regex in python

2006-05-25 Thread John Machin
On 25/05/2006 7:58 PM, gisleyt wrote: > I'm trying to compile a perfectly valid regex, but get the error > message: > > r = > re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.3/sr

Re: regex in python

2006-05-25 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, gisleyt <[EMAIL PROTECTED]> wrote: >I'm trying to compile a perfectly valid regex, but get the error >message: > > r = >re.compile(r'([^\d]*)(\d{1,3}\.\d{0,2})?(\d*)(\,\d{1,3}\.\d{0,2})?(\d*)?.*') >Traceback (most recent call last): > File "", line 1, in ? > File "

Re: regex in python

2006-05-25 Thread Tim Chase
> 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-m