pcre2_match_data_create.3 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. .TH PCRE2_MATCH_DATA_CREATE 3 "28 August 2021" "PCRE2 10.38"
  2. .SH NAME
  3. PCRE2 - Perl-compatible regular expressions (revised API)
  4. .SH SYNOPSIS
  5. .rs
  6. .sp
  7. .B #include <pcre2.h>
  8. .PP
  9. .nf
  10. .B pcre2_match_data *pcre2_match_data_create(uint32_t \fIovecsize\fP,
  11. .B " pcre2_general_context *\fIgcontext\fP);"
  12. .fi
  13. .
  14. .SH DESCRIPTION
  15. .rs
  16. .sp
  17. This function creates a new match data block, which is used for holding the
  18. result of a match. The first argument specifies the number of pairs of offsets
  19. that are required. These form the "output vector" (ovector) within the match
  20. data block, and are used to identify the matched string and any captured
  21. substrings when matching with \fBpcre2_match()\fP, or a number of different
  22. matches at the same point when used with \fBpcre2_dfa_match()\fP. There is
  23. always one pair of offsets; if \fBovecsize\fP is zero, it is treated as one.
  24. .P
  25. The second argument points to a general context, for custom memory management,
  26. or is NULL for system memory management. The result of the function is NULL if
  27. the memory for the block could not be obtained.
  28. .P
  29. There is a complete description of the PCRE2 native API in the
  30. .\" HREF
  31. \fBpcre2api\fP
  32. .\"
  33. page and a description of the POSIX API in the
  34. .\" HREF
  35. \fBpcre2posix\fP
  36. .\"
  37. page.