Re: How do I parse this ? regexp ? [slighly OT]

2005-04-28 Thread Simon Dahlbacka
safetyChecker = re.compile(r^[-\[\]0-9,. ]*$) ..doesn't the dot (.) in your character class mean that you are allowing EVERYTHING (except newline?) (you would probably want \. instead) /Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I parse this ? regexp ? [slighly OT]

2005-04-28 Thread Peter Hansen
Simon Dahlbacka wrote: safetyChecker = re.compile(r^[-\[\]0-9,. ]*$) ..doesn't the dot (.) in your character class mean that you are allowing EVERYTHING (except newline?) The re docs clearly say this is not the case: ''' [] Used to indicate a set of characters. Characters can be listed

Re: How do I parse this ? regexp ? [slighly OT]

2005-04-28 Thread Jeremy Bowers
On Thu, 28 Apr 2005 20:53:14 -0400, Peter Hansen wrote: The re docs clearly say this is not the case: ''' [] Used to indicate a set of characters. Characters can be listed individually, or a range of characters can be indicated by giving two characters and separating them by a -.