diff options
Diffstat (limited to 'doc/RegExp.3')
-rw-r--r-- | doc/RegExp.3 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/RegExp.3 b/doc/RegExp.3 index 61778cd..1f1064d 100644 --- a/doc/RegExp.3 +++ b/doc/RegExp.3 @@ -1,21 +1,25 @@ '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. +'\" Copyright (c) 1998-1999 Scriptics Corportation '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegExp.3,v 1.2 1998/09/14 18:39:50 stanton Exp $ +'\" RCS: @(#) $Id: RegExp.3,v 1.3 1999/04/16 00:46:32 stanton Exp $ '\" .so man.macros .TH Tcl_RegExpMatch 3 7.4 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange \- Pattern matching with regular expressions +Tcl_GetRegExpFromObj, Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange \- Pattern matching with regular expressions .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp +Tcl_RegExp +\fBTcl_GetRegExpFromObj\fR(\fIinterp\fR, \fIpatObj\fR, \fIflags\fR) +.sp int \fBTcl_RegExpMatch\fR(\fIinterp\fR, \fIstring\fR, \fIpattern\fR) .sp @@ -34,9 +38,13 @@ Tcl interpreter to use for error reporting. String to check for a match with a regular expression. .AP char *pattern in String in the form of a regular expression pattern. +.AP Tcl_Obj *patObj in +Refers to the object from which to get a compiled regular expression. +.AP int flags in +Various flags to control regular expression compile options. .AP Tcl_RegExp regexp in Compiled regular expression. Must have been returned previously -by \fBTcl_RegExpCompile\fR. +by \fBTcl_GetRegExpFromObj\fR. .AP char *start in If \fIstring\fR is just a portion of some other string, this argument identifies the beginning of the larger string. @@ -56,6 +64,13 @@ is stored here, or NULL if there is no such range. .SH DESCRIPTION .PP +\fBTcl_GetRegExpFromObj\fR attepts to return a compiled regular +expression from the Tcl obj \fIpatObj\fR. If the object does not +already contain a compiled regular expression it will attempt to +create one from the string in the Tcl obj and assign it to the +internal representation of the \fIpatObj\fR. The return value +of this function is of type \fBTcl_RegExp\fR. +.PP \fBTcl_RegExpMatch\fR determines whether its \fIpattern\fR argument matches \fIregexp\fR, where \fIregexp\fR is interpreted as a regular expression using the same rules as for the |