]> granicus.if.org Git - python/commit
Closing issue1761.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 10 Jan 2008 21:59:42 +0000 (21:59 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 10 Jan 2008 21:59:42 +0000 (21:59 +0000)
commitd08a8ebf2a8fe9705a48468c9280445afd1df324
tree48c40584a370567a3426b115c588d1bdaecd507c
parente850c466c7dd25baac71997d6ca073e3586526b5
Closing issue1761.
Surprising behaviour of the "$" regexp: it matches the
end of the string, AND just before the newline at the end
of the string::

    re.sub('$', '#', 'foo\n') == 'foo#\n#'

Python is consistent with Perl and the pcre library, so
we just document it.
Guido prefers "\Z" to match only the end of the string.
Doc/library/re.rst
Lib/test/test_re.py