[issue1761] Bug in re.sub()

Facundo Batista report at bugs.python.org
Tue Jan 8 14:13:50 CET 2008


Facundo Batista added the comment:

As re provides regular expression matching operations similar to those
found in Perl, I tried there to see what happens:

"""
use Data::Dumper;

$a = 'a\nb\nc';
$a =~ s/$/#/;
print Dumper($a);

$a = 'a\nb\n';
$a =~ s/$/#/;
print Dumper($a);
"""

$ perl pru_sub.pl
$VAR1 = 'a\\nb\\nc#';
$VAR1 = 'a\\nb\\n#';

----------
nosy: +facundobatista

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1761>
__________________________________


More information about the Python-bugs-list mailing list