Regular Expressions and Python 1.5.2

Alexandre Fayolle alf at leo.logilab.fr
Thu Mar 15 10:05:13 CET 2001


Is this a known bug in the module re of python 1.5.2, or am I missing 
something obvious?

>>> import re
>>> t = "m&n"
>>> re.sub('[^/_ -]','*',t)
'***'
>>> re.sub('[^_ -/]','*',t)
'*&*'

TIA

Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).



More information about the Python-list mailing list