Amaury Forgeot d'Arc 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 documentation: http://docs.pyth
New submission from sleepyfish :
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 the same problem
--