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, jmravon
Date 2008-01-08.09:54:55
SpamBayes Score 0.07196681
Marked as misclassified No
Message-id <1199786096.66.0.487860408613.issue1761@psf.upfronthosting.co.za>
In-reply-to
Content
In other words, if I understand correctly:
>>> re.sub('$', '#', 'a\nb\nc')
'a\nb\nc#'
>>> re.sub('$', '#', 'a\nb\n')
'a\nb#\n#'

The first sample is correct, but the second one find two matches, even
without the re.MULTILINE option.

Is this normal? The docs say: 
> '$' Matches the end of the string or just before the newline at 
> the end of the string [...]
It seems that it matches BOTH the end of the string AND just before the
newline at the end of the string.
History
Date User Action Args
2008-01-08 09:54:56amaury.forgeotdarcsetspambayes_score: 0.0719668 -> 0.07196681
recipients: + amaury.forgeotdarc, jmravon
2008-01-08 09:54:56amaury.forgeotdarcsetspambayes_score: 0.0719668 -> 0.0719668
messageid: <1199786096.66.0.487860408613.issue1761@psf.upfronthosting.co.za>
2008-01-08 09:54:55amaury.forgeotdarclinkissue1761 messages
2008-01-08 09:54:55amaury.forgeotdarccreate