Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-07-07
15:37 • Closed ticket [1982642fff]: bad regsub examples plus 7 other changes artifact: 1197d727da user: dkf
2008-07-03
22:59 • Ticket [1982642fff]: 5 changes artifact: 193c7539ea user: dgp
2008-06-02
20:52 • New ticket [1982642fff]. artifact: b95161f29b user: dgp

bad regsub examples

Closed / Fixed1982642fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 18 years ago
Descriptionplain2008-06-02 20:52:03
Docs for regsub include example:

    regsub -all {\<foo\>} $string bar string

which needs to be:

    regsub -all {(?b)\<foo\>} $string bar string

and includes example:

    regsub -nocase {\<interesting\>} $string {"&"} string

which needs to be:

    regsub -nocase {(?b)\<interesting\>} $string {"&"} string

I'm guessing these examples date back
to the pre-8.1 days and never got updated.
dgpplain2008-07-03 22:59:40
Logged In: YES 
user_id=80530
Originator: YES


Is it better to add the (?b) to the
patterns, or to replace them completely
with AREs that do the same thing?
dkfplain2008-07-07 15:37:11
Logged In: YES 
user_id=79902
Originator: NO

Fixed on HEAD and 8.5 branch
Log in (anonymous is fine) to add a comment.