Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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.