Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 593d7edab67107b6f89308437115a3ac2560bb22
Ticket: 218773ffffffffffffffffffffffffffffffffff
Add new regexp options to regsub
User & Date: nobody on 2000-10-26 01:05:11
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2079 RFE
    Version: 8.1
    SubmitDate: '1999-05-17'
    LastModified: '1999-08-04'
    Severity: LOW
    Status: Released
    Submitter: pat
    ChangedBy: stanton
    OS: Linux
    Machine: Other
    FixedDate: '1999-08-04'
    FixedInVersion: 8.1b2
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Thomas Koutcher
    
    
    
    DesiredBehavior:
    
    Several interesting options have been added to regexp (e.g. -line). It
    
        would be fine to have them in regsub.
    
    
    
    Patch:
    
    --- tclCmdMZ.c.origThu Apr 29 01:11:40 1999
    
    +++ tclCmdMZ.cSat May 15 12:29:32 1999
    
    @@ -327,10 +327,12 @@
    
         CONST Tcl_UniChar *w, *wStart, *wEnd;
    
         char *string, *subspec, *varname;
    
         static char *options[] = {
    
    -"-all","-nocase","--",NULL
    
    +"-all","-nocase","-expanded","-line",
    
    +"-linestop","-lineanchor","--",NULL
    
         };
    
         enum options {
    
    -REGSUB_ALL,REGSUB_NOCASE,REGSUB_LAST
    
    +REGSUB_ALL,REGSUB_NOCASE,REGSUB_EXPANDED,REGSUB_LINE,
    
    +REGSUB_LINESTOP,REGSUB_LINEANCHOR,REGSUB_LAST
    
         };
    
     
    
         flags = 0;
    
    @@ -355,6 +357,22 @@
    
         }
    
         case REGSUB_NOCASE: {
    
     flags |= REG_ICASE;
    
    +break;
    
    +    }
    
    +    case REGSUB_EXPANDED: {
    
    +flags |= REG_EXPANDED;
    
    +break;
    
    +    }
    
    +    case REGSUB_LINE: {
    
    +flags |= REG_NEWLINE;
    
    +break;
    
    +    }
    
    +    case REGSUB_LINESTOP: {
    
    +flags |= REG_NLSTOP;
    
    +break;
    
    +    }
    
    +    case REGSUB_LINEANCHOR: {
    
    +flags |= REG_NLANCH;
    
     break;
    
         }
    
         case REGSUB_LAST: {
    
    
    
    PatchFiles:
    
    tclCmdMZ.c
    
    
    
    
    
    08/04/1999 17:44 - stanton - This patch has been applied.
    
  4. foundin changed to: "obsolete: 8.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "Add new regexp options to regsub"
  11. type changed to: "Bug"