157 |
.rs |
.rs |
158 |
.sp |
.sp |
159 |
The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP |
The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP |
160 |
against a given \fIstring\fP, which is terminated by a zero byte, subject to |
against a given \fIstring\fP, which is by default terminated by a zero byte |
161 |
the options in \fIeflags\fP. These can be: |
(but see REG_STARTEND below), subject to the options in \fIeflags\fP. These can |
162 |
|
be: |
163 |
.sp |
.sp |
164 |
REG_NOTBOL |
REG_NOTBOL |
165 |
.sp |
.sp |
170 |
.sp |
.sp |
171 |
The PCRE_NOTEOL option is set when calling the underlying PCRE matching |
The PCRE_NOTEOL option is set when calling the underlying PCRE matching |
172 |
function. |
function. |
173 |
|
.sp |
174 |
|
REG_STARTEND |
175 |
|
.sp |
176 |
|
The string is considered to start at \fIstring\fP + \fIpmatch[0].rm_so\fP and |
177 |
|
to have a terminating NUL located at \fIstring\fP + \fIpmatch[0].rm_eo\fP |
178 |
|
(there need not actually be a NUL at that location), regardless of the value of |
179 |
|
\fInmatch\fP. This is a BSD extension, compatible with but not specified by |
180 |
|
IEEE Standard 1003.2 (POSIX.2), and should be used with caution in software |
181 |
|
intended to be portable to other systems. Note that a non-zero \fIrm_so\fP does |
182 |
|
not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not |
183 |
|
how it is matched. |
184 |
.P |
.P |
185 |
If the pattern was compiled with the REG_NOSUB flag, no data about any matched |
If the pattern was compiled with the REG_NOSUB flag, no data about any matched |
186 |
strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of |
strings is returned. The \fInmatch\fP and \fIpmatch\fP arguments of |
233 |
.rs |
.rs |
234 |
.sp |
.sp |
235 |
.nf |
.nf |
236 |
Last updated: 06 March 2007 |
Last updated: 05 April 2008 |
237 |
Copyright (c) 1997-2007 University of Cambridge. |
Copyright (c) 1997-2008 University of Cambridge. |
238 |
.fi |
.fi |