Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Add new regexp options to regsub

Closed / Fixed218773ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:05:11
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.
welch Closed ticket [218773ffff]. [History diff]2000-10-26 08:28:15
Log in (anonymous is fine) to add a comment.