1e18e3516Sopenharmony_ci<html> 2e18e3516Sopenharmony_ci<head> 3e18e3516Sopenharmony_ci<title>pcre2_substring_copy_bynumber specification</title> 4e18e3516Sopenharmony_ci</head> 5e18e3516Sopenharmony_ci<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB"> 6e18e3516Sopenharmony_ci<h1>pcre2_substring_copy_bynumber man page</h1> 7e18e3516Sopenharmony_ci<p> 8e18e3516Sopenharmony_ciReturn to the <a href="index.html">PCRE2 index page</a>. 9e18e3516Sopenharmony_ci</p> 10e18e3516Sopenharmony_ci<p> 11e18e3516Sopenharmony_ciThis page is part of the PCRE2 HTML documentation. It was generated 12e18e3516Sopenharmony_ciautomatically from the original man page. If there is any nonsense in it, 13e18e3516Sopenharmony_ciplease consult the man page, in case the conversion went wrong. 14e18e3516Sopenharmony_ci<br> 15e18e3516Sopenharmony_ci<br><b> 16e18e3516Sopenharmony_ciSYNOPSIS 17e18e3516Sopenharmony_ci</b><br> 18e18e3516Sopenharmony_ci<P> 19e18e3516Sopenharmony_ci<b>#include <pcre2.h></b> 20e18e3516Sopenharmony_ci</P> 21e18e3516Sopenharmony_ci<P> 22e18e3516Sopenharmony_ci<b>int pcre2_substring_copy_bynumber(pcre2_match_data *<i>match_data</i>,</b> 23e18e3516Sopenharmony_ci<b> uint32_t <i>number</i>, PCRE2_UCHAR *<i>buffer</i>,</b> 24e18e3516Sopenharmony_ci<b> PCRE2_SIZE *<i>bufflen</i>);</b> 25e18e3516Sopenharmony_ci</P> 26e18e3516Sopenharmony_ci<br><b> 27e18e3516Sopenharmony_ciDESCRIPTION 28e18e3516Sopenharmony_ci</b><br> 29e18e3516Sopenharmony_ci<P> 30e18e3516Sopenharmony_ciThis is a convenience function for extracting a captured substring into a given 31e18e3516Sopenharmony_cibuffer. The arguments are: 32e18e3516Sopenharmony_ci<pre> 33e18e3516Sopenharmony_ci <i>match_data</i> The match data block for the match 34e18e3516Sopenharmony_ci <i>number</i> Number of the required substring 35e18e3516Sopenharmony_ci <i>buffer</i> Buffer to receive the string 36e18e3516Sopenharmony_ci <i>bufflen</i> Length of buffer 37e18e3516Sopenharmony_ci</pre> 38e18e3516Sopenharmony_ciThe <i>bufflen</i> variable is updated with the length of the extracted string, 39e18e3516Sopenharmony_ciexcluding the terminating zero. The yield of the function is zero for success 40e18e3516Sopenharmony_cior one of the following error numbers: 41e18e3516Sopenharmony_ci<pre> 42e18e3516Sopenharmony_ci PCRE2_ERROR_NOSUBSTRING there are no groups of that number 43e18e3516Sopenharmony_ci PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group 44e18e3516Sopenharmony_ci PCRE2_ERROR_UNSET the group did not participate in the match 45e18e3516Sopenharmony_ci PCRE2_ERROR_NOMEMORY the buffer is too small 46e18e3516Sopenharmony_ci 47e18e3516Sopenharmony_ci</PRE> 48e18e3516Sopenharmony_ci</P> 49e18e3516Sopenharmony_ci<P> 50e18e3516Sopenharmony_ciThere is a complete description of the PCRE2 native API in the 51e18e3516Sopenharmony_ci<a href="pcre2api.html"><b>pcre2api</b></a> 52e18e3516Sopenharmony_cipage and a description of the POSIX API in the 53e18e3516Sopenharmony_ci<a href="pcre2posix.html"><b>pcre2posix</b></a> 54e18e3516Sopenharmony_cipage. 55e18e3516Sopenharmony_ci<p> 56e18e3516Sopenharmony_ciReturn to the <a href="index.html">PCRE2 index page</a>. 57e18e3516Sopenharmony_ci</p> 58