jamadden / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 2 forks source link

behaviour of regex.escape's special_only is wrong #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import regex
>>> regex.escape(r"foo!?")
'foo\\!\\?'
>>> regex.escape(r"foo!?", special_only=1)
'\\f\\o\\o!?'

What is the expected output? What do you see instead?
according to document,
>>> regex.escape(r"foo!?", special_only=1)
should be
'foo!\\?'

What version of the product are you using? On what operating system?
regex-2013_10_22-py2.7-win32

Please provide any additional information below.

Original issue reported on code.google.com by Lyricconch on 24 Oct 2013 at 4:53

GoogleCodeExporter commented 9 years ago
Fixed in source code.

Original comment by re...@mrabarnett.plus.com on 24 Oct 2013 at 11:13

GoogleCodeExporter commented 9 years ago
Fixed in regex 2013-10-25.

Original comment by re...@mrabarnett.plus.com on 25 Oct 2013 at 3:12