• Amaury Forgeot d'Arc's avatar
    Closing issue1761. · d08a8ebf
    Amaury Forgeot d'Arc yazdı
    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.
    d08a8ebf
test_re.py 36.3 KB