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 spz1st
Recipients malin, spz1st
Date 2020-08-15.12:10:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAGxvNCtV3i=94F-e2=JvU8FcoY1hOdTaXvYEZO6bEgmJJuWUiQ@mail.gmail.com>
In-reply-to <1597459059.77.0.141713288192.issue41555@roundup.psfhosted.org>
Content
Thanks.   But if talking about empty matches, there would be endless empty
matches at the end in such cases.  So in my opinion, [^\.]*$ should match
txt plus the empty match because the greedy rule applies here.

On Fri, Aug 14, 2020 at 10:37 PM Ma Lin <report@bugs.python.org> wrote:

>
> Ma Lin <malincns@163.com> added the comment:
>
> The re.sub() doc said:
> Changed in version 3.7: Empty matches for the pattern are replaced when
> adjacent to a previous non-empty match.
>
> IMO 3.7+ behavior is more reasonable, and it fixed a bug, see issue25054.
>
> ----------
> nosy: +malin
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41555>
> _______________________________________
>
History
Date User Action Args
2020-08-15 12:10:48spz1stsetrecipients: + spz1st
2020-08-15 12:10:48spz1stlinkissue41555 messages
2020-08-15 12:10:47spz1stcreate