| 66 |
replacement library. Other POSIX options are not even defined. |
replacement library. Other POSIX options are not even defined. |
| 67 |
</P> |
</P> |
| 68 |
<P> |
<P> |
| 69 |
|
There are also some other options that are not defined by POSIX. These have |
| 70 |
|
been added at the request of users who want to make use of certain |
| 71 |
|
PCRE-specific features via the POSIX calling interface. |
| 72 |
|
</P> |
| 73 |
|
<P> |
| 74 |
When PCRE is called via these functions, it is only the API that is POSIX-like |
When PCRE is called via these functions, it is only the API that is POSIX-like |
| 75 |
in style. The syntax and semantics of the regular expressions themselves are |
in style. The syntax and semantics of the regular expressions themselves are |
| 76 |
still those of Perl, subject to the setting of various PCRE options, as |
still those of Perl, subject to the setting of various PCRE options, as |
| 126 |
<i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no captured strings |
<i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no captured strings |
| 127 |
are returned. |
are returned. |
| 128 |
<pre> |
<pre> |
| 129 |
|
REG_UNGREEDY |
| 130 |
|
</pre> |
| 131 |
|
The PCRE_UNGREEDY option is set when the regular expression is passed for |
| 132 |
|
compilation to the native function. Note that REG_UNGREEDY is not part of the |
| 133 |
|
POSIX standard. |
| 134 |
|
<pre> |
| 135 |
REG_UTF8 |
REG_UTF8 |
| 136 |
</pre> |
</pre> |
| 137 |
The PCRE_UTF8 option is set when the regular expression is passed for |
The PCRE_UTF8 option is set when the regular expression is passed for |
| 145 |
particular, the way it handles newline characters in the subject string is the |
particular, the way it handles newline characters in the subject string is the |
| 146 |
Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only |
Perl way, not the POSIX way. Note that setting PCRE_MULTILINE has only |
| 147 |
<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way |
<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way |
| 148 |
newlines are matched by . (they aren't) or by a negative class such as [^a] |
newlines are matched by . (they are not) or by a negative class such as [^a] |
| 149 |
(they are). |
(they are). |
| 150 |
</P> |
</P> |
| 151 |
<P> |
<P> |
| 233 |
<b>regexec()</b> are ignored. |
<b>regexec()</b> are ignored. |
| 234 |
</P> |
</P> |
| 235 |
<P> |
<P> |
| 236 |
|
If the value of <i>nmatch</i> is zero, or if the value <i>pmatch</i> is NULL, |
| 237 |
|
no data about any matched strings is returned. |
| 238 |
|
</P> |
| 239 |
|
<P> |
| 240 |
Otherwise,the portion of the string that was matched, and also any captured |
Otherwise,the portion of the string that was matched, and also any captured |
| 241 |
substrings, are returned via the <i>pmatch</i> argument, which points to an |
substrings, are returned via the <i>pmatch</i> argument, which points to an |
| 242 |
array of <i>nmatch</i> structures of type <i>regmatch_t</i>, containing the |
array of <i>nmatch</i> structures of type <i>regmatch_t</i>, containing the |
| 277 |
</P> |
</P> |
| 278 |
<br><a name="SEC9" href="#TOC1">REVISION</a><br> |
<br><a name="SEC9" href="#TOC1">REVISION</a><br> |
| 279 |
<P> |
<P> |
| 280 |
Last updated: 15 August 2009 |
Last updated: 02 September 2009 |
| 281 |
<br> |
<br> |
| 282 |
Copyright © 1997-2009 University of Cambridge. |
Copyright © 1997-2009 University of Cambridge. |
| 283 |
<br> |
<br> |