This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, effbot, facundobatista, georg.brandl, gvanrossum, jmravon
Date 2008-01-08.21:47:00
SpamBayes Score 0.02700675
Marked as misclassified No
Message-id <1199828824.07.0.674822291809.issue1761@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-01-08 21:47:04amaury.forgeotdarcsetspambayes_score: 0.0270068 -> 0.02700675
recipients: + amaury.forgeotdarc, gvanrossum, effbot, georg.brandl, facundobatista, jmravon
2008-01-08 21:47:04amaury.forgeotdarcsetspambayes_score: 0.0270068 -> 0.0270068
messageid: <1199828824.07.0.674822291809.issue1761@psf.upfronthosting.co.za>
2008-01-08 21:47:01amaury.forgeotdarclinkissue1761 messages
2008-01-08 21:47:00amaury.forgeotdarccreate