New submission from S. Zhang <[email protected]>:
The following command produced "name.tsvtsv" with version 3.7.1 and 3.8.5
instead of the expected "name.tsv" from version 2.7.5, 3.5.6, and 3.6.7.
Changing * to + produced expected "name.tsv".
python -c 'import re; v="name.txt";v = re.sub("[^\.]*$", "tsv", v);print(v)'
----------
messages: 375436
nosy: spz1st
priority: normal
severity: normal
status: open
title: re.sub replaces twice
type: behavior
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41555>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com