58 lines
2.2 KiB
Groff
58 lines
2.2 KiB
Groff
'\"
|
|
'\" Copyright (c) 1993 The Regents of the University of California.
|
|
'\" All rights reserved.
|
|
'\"
|
|
'\" Permission is hereby granted, without written agreement and without
|
|
'\" license or royalty fees, to use, copy, modify, and distribute this
|
|
'\" documentation for any purpose, provided that the above copyright
|
|
'\" notice and the following two paragraphs appear in all copies.
|
|
'\"
|
|
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
|
|
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
|
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
'\"
|
|
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
|
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
|
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
'\"
|
|
'\" $Header: /user6/ouster/tcl/man/RCS/RegExp.3,v 1.1 93/05/05 17:06:04 ouster Exp $ SPRITE (Berkeley)
|
|
'\"
|
|
.so man.macros
|
|
.HS Tcl_RegExpMatch tclc 7.0
|
|
.BS
|
|
.SH NAME
|
|
Tcl_RegExpMatch \- Test whether a string matches a regular expression
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\fB#include <tcl.h>\fR
|
|
.sp
|
|
int
|
|
\fBTcl_RegExpMatch\fR(\fIinterp\fR, \fIstring\fR, \fIregexp\fR)
|
|
.SH ARGUMENTS
|
|
.AS Tcl_Interp *interp
|
|
.AP Tcl_Interp *interp in
|
|
Tcl interpreter to use for error reporting.
|
|
.AP char *string in
|
|
String to test.
|
|
.AP char *regexp in
|
|
Regular expression to match against \fIstring\fR.
|
|
.BE
|
|
|
|
.SH DESCRIPTION
|
|
.PP
|
|
\fBTcl_RegExpMatch\fR determines whether its \fIstring\fR argument
|
|
matches \fIregexp\fR, where \fIregexp\fR is interpreted
|
|
as a regular expression using the same rules as for the
|
|
\fBregexp\fR Tcl command.
|
|
If there is a match then \fBTcl_RegExpMatch\fR returns 1.
|
|
If there is no match then \fBTcl_RegExpMatch\fR returns 0.
|
|
If an error occurs in the matching process (e.g. \fIregexp\fR
|
|
is not a valid regular expression) then \fBTcl_RegExpMatch\fR
|
|
returns \-1 and leaves an error message in \fIinterp->result\fR.
|
|
|
|
.SH KEYWORDS
|
|
match, regular expression, string
|