Amaury Forgeot d'Arc added the comment:

In the previous samples we forgot the /g option needed to match ALL
occurrences of the pattern:

"""
use Data::Dumper;

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

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

Which now gives the same output as Python:

$VAR1 = 'a
b
c#';
$VAR1 = 'a
b#
#';

Perl is too difficult for us ;-)

What shall we do?
- mark the issue as invalid
- diverge from Perl regular expressions
- file a bug in the PCRE issue tracker
And in every case: add these samples to the test suite.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1761>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to