|
27 | 27 | </h2> |
28 | 28 | <p> |
29 | 29 | This function creates a new match data block for holding the result of a match. |
30 | | -The first argument points to a compiled pattern. The number of capturing |
31 | | -parentheses within the pattern is used to compute the number of pairs of |
32 | | -offsets that are required in the match data block. These form the "output |
33 | | -vector" (ovector) within the match data block, and are used to identify the |
34 | | -matched string and any captured substrings when matching with |
35 | | -<b>pcre2_match()</b>. If you are using <b>pcre2_dfa_match()</b>, which uses the |
36 | | -output vector in a different way, you should use <b>pcre2_match_data_create()</b> |
37 | | -instead of this function. |
| 30 | +If the first argument is NULL, this function returns NULL, otherwise the first |
| 31 | +argument points to a compiled pattern. The number of capturing parentheses |
| 32 | +within the pattern is used to compute the number of pairs of offsets that are |
| 33 | +required in the match data block. These form the "output vector" (ovector) |
| 34 | +within the match data block, and are used to identify the matched string and |
| 35 | +any captured substrings when matching with <b>pcre2_match()</b>. If you are |
| 36 | +using <b>pcre2_dfa_match()</b>, which uses the output vector in a different way, |
| 37 | +you should use <b>pcre2_match_data_create()</b> instead of this function. |
38 | 38 | </p> |
39 | 39 | <p> |
40 | 40 | The second argument points to a general context, for custom memory management, |
41 | | -or is NULL to use the same memory allocator as was used for the compiled |
| 41 | +or is NULL to use the same memory allocator that was used for the compiled |
42 | 42 | pattern. The result of the function is NULL if the memory for the block could |
43 | | -not be obtained. |
| 43 | +not be obtained or if NULL was provided as the first argument. |
44 | 44 | </p> |
45 | 45 | <p> |
46 | 46 | There is a complete description of the PCRE2 native API in the |
|
0 commit comments