| 1 |
nigel |
63 |
<html> |
| 2 |
|
|
<head> |
| 3 |
|
|
<title>pcre_get_named_substring specification</title> |
| 4 |
|
|
</head> |
| 5 |
|
|
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB"> |
| 6 |
nigel |
75 |
<h1>pcre_get_named_substring man page</h1> |
| 7 |
|
|
<p> |
| 8 |
|
|
Return to the <a href="index.html">PCRE index page</a>. |
| 9 |
|
|
</p> |
| 10 |
ph10 |
111 |
<p> |
| 11 |
nigel |
75 |
This page is part of the PCRE HTML documentation. It was generated automatically |
| 12 |
|
|
from the original man page. If there is any nonsense in it, please consult the |
| 13 |
|
|
man page, in case the conversion went wrong. |
| 14 |
ph10 |
111 |
<br> |
| 15 |
nigel |
63 |
<br><b> |
| 16 |
|
|
SYNOPSIS |
| 17 |
|
|
</b><br> |
| 18 |
|
|
<P> |
| 19 |
|
|
<b>#include <pcre.h></b> |
| 20 |
|
|
</P> |
| 21 |
|
|
<P> |
| 22 |
|
|
<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b> |
| 23 |
ph10 |
1339 |
<b> const char *<i>subject</i>, int *<i>ovector</i>,</b> |
| 24 |
|
|
<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b> |
| 25 |
|
|
<b> const char **<i>stringptr</i>);</b> |
| 26 |
|
|
<br> |
| 27 |
|
|
<br> |
| 28 |
ph10 |
869 |
<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b> |
| 29 |
ph10 |
1339 |
<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> |
| 30 |
|
|
<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b> |
| 31 |
|
|
<b> PCRE_SPTR16 *<i>stringptr</i>);</b> |
| 32 |
|
|
<br> |
| 33 |
|
|
<br> |
| 34 |
ph10 |
1194 |
<b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b> |
| 35 |
ph10 |
1339 |
<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> |
| 36 |
|
|
<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b> |
| 37 |
|
|
<b> PCRE_SPTR32 *<i>stringptr</i>);</b> |
| 38 |
ph10 |
1194 |
</P> |
| 39 |
nigel |
63 |
<br><b> |
| 40 |
|
|
DESCRIPTION |
| 41 |
|
|
</b><br> |
| 42 |
|
|
<P> |
| 43 |
|
|
This is a convenience function for extracting a captured substring by name. The |
| 44 |
|
|
arguments are: |
| 45 |
|
|
<pre> |
| 46 |
|
|
<i>code</i> Compiled pattern |
| 47 |
|
|
<i>subject</i> Subject that has been successfully matched |
| 48 |
ph10 |
1194 |
<i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used |
| 49 |
|
|
<i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b> |
| 50 |
nigel |
63 |
<i>stringname</i> Name of the required substring |
| 51 |
|
|
<i>stringptr</i> Where to put the string pointer |
| 52 |
nigel |
75 |
</pre> |
| 53 |
|
|
The memory in which the substring is placed is obtained by calling |
| 54 |
ph10 |
1194 |
<b>pcre[16|32]_malloc()</b>. The convenience function |
| 55 |
|
|
<b>pcre[16|32]_free_substring()</b> can be used to free it when it is no longer |
| 56 |
ph10 |
869 |
needed. The yield of the function is the length of the extracted substring, |
| 57 |
|
|
PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or |
| 58 |
|
|
PCRE_ERROR_NOSUBSTRING if the string name is invalid. |
| 59 |
nigel |
63 |
</P> |
| 60 |
|
|
<P> |
| 61 |
nigel |
75 |
There is a complete description of the PCRE native API in the |
| 62 |
nigel |
63 |
<a href="pcreapi.html"><b>pcreapi</b></a> |
| 63 |
nigel |
75 |
page and a description of the POSIX API in the |
| 64 |
|
|
<a href="pcreposix.html"><b>pcreposix</b></a> |
| 65 |
nigel |
63 |
page. |
| 66 |
nigel |
75 |
<p> |
| 67 |
|
|
Return to the <a href="index.html">PCRE index page</a>. |
| 68 |
|
|
</p> |