Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 26cc6aa69840c15e76ce05ee6d5607dde0df1e99
Ticket: 550799ffffffffffffffffffffffffffffffffff
Evaluation of substitutions in [regsub]
User & Date: dkf on 2002-04-30 21:47:10
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    It would be nice if there was a switch to [regsub] to
    make it automatically pass the strings it is
    substituting through, say, Tcl_SubstObj() before
    substitution. At the moment you need to perform several
    stages of substitution, first hiding all significant
    characters in the input string, then substituting
    things (usually looking like command substitutions)
    which describe what you actually want to change, and
    finally passing the result through [subst] to convert
    the substitutions into their actual value.  Sure this
    works, but it is not a technique that is clear to
    anyone other than a Tcl guru, and being able to perform
    the substitution on strings as they are being replaced
    by [regsub] would be much clearer (especially as it
    would also allow the removal of the pre-filtering stage
    as well.)
    
    Naturally, if this was done some care would need to be
    taken with ensuring that those parts derived from the
    string being matched were properly quoted as well, but
    this idea already exists in principle in Tk (in binding
    script substitutions) so it won't be foreign to users...
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dkf"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "Evaluation of substitutions in [regsub]"
  11. type changed to: "RFE"