Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-11-12
12:32 • Closed ticket [3414132fff]: Regsub repeats "supSpec" plus 7 other ... artifact: 6e13b622c1 user: dkf
2011-09-28
00:08 • Pending ticket [3414132fff]. artifact: a499ea61be user: dgp
2011-09-27
23:26 • Ticket [3414132fff]: 4 changes artifact: a778e502c0 user: dgp
01:09 • Ticket [3414132fff]: 4 changes artifact: 724d1dde54 user: anonymous
2011-09-26
18:05 • New ticket [3414132fff]. artifact: 5270c4ee56 user: anonymous

Regsub repeats "supSpec"

Closed / Invalid3414132fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 13 years ago
Descriptionplain2011-09-26 18:05:14
Same problem on 8.6b2

% regsub -all -- {(.*)} "something" {\1test}
somethingtesttest

The same:
% regsub -all -- {(.*)} "something" {\1 test}
something test test

With $:
% regsub -all -- {(.*)$} "something" {\1 test}
something test test

But with ^ (or ^ and $):
% regsub -all -- {^(.*)} "something" {\1 test}
something test
% regsub -all -- {^(.*)$} "something" {\1 test}
something test
plain2011-09-27 01:09:51
Without -all it's ok too.
dgpplain2011-09-27 23:26:48
(.*) matches the empty string.
dgpplain2011-09-28 00:08:46
This change happened in checkins
31ae6969b0 and 6f6bf2acac on
2003-06-17 and was first released
in 8.4.3 and 8.5a1.  Commit message
calls it a bug fix:

2003-06-17  Vince Darley  <[email protected]>

        * generic/tclCmdMZ.c:
        * tests/regexp.test: fixing of bugs related to regexp and regsub
        matching of empty strings. Addition of a number of new tests.
dkf Closed ticket [3414132fff]. [History diff]2013-11-12 12:32:24
Log in (anonymous is fine) to add a comment.