[issue5020] Regex Expression Error

2009-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the program crash Well, it's not a crash, but a graceful exception: sre_constants.error: bad character range Your regular expression is invalid: the '-' has a special meaning inside square brackets. Please consult the

[issue5020] Regex Expression Error

2009-01-20 Thread sleepyfish
New submission from sleepyfish huangpeng1...@gmail.com: import re re.match(r'[/- ]','/') crash, but re.match(r'[ /-]','/'), or re.match(r'[/ -]','/'), or re.match(r'[ -/]','/') ... only when the match pattern is r'[/-]', the program crash I run it in version 2.6.1 and version 3.0, both having