github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. .TH PCRE2_SUBSTRING_GET_BYNAME 3 "21 October 2014" "PCRE2 10.00"
  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 int pcre2_substring_get_byname(pcre2_match_data *\fImatch_data\fP,
  11. .B " PCRE2_SPTR \fIname\fP, PCRE2_UCHAR **\fIbufferptr\fP, PCRE2_SIZE *\fIbufflen\fP);"
  12. .fi
  13. .
  14. .SH DESCRIPTION
  15. .rs
  16. .sp
  17. This is a convenience function for extracting a captured substring by name into
  18. newly acquired memory. The arguments are:
  19. .sp
  20. \fImatch_data\fP The match data for the match
  21. \fIname\fP Name of the required substring
  22. \fIbufferptr\fP Where to put the string pointer
  23. \fIbufflen\fP Where to put the string length
  24. .sp
  25. The memory in which the substring is placed is obtained by calling the same
  26. memory allocation function that was used for the match data block. The
  27. convenience function \fBpcre2_substring_free()\fP can be used to free it when
  28. it is no longer needed. The yield of the function is zero for success or one of
  29. the following error numbers:
  30. .sp
  31. PCRE2_ERROR_NOSUBSTRING there are no groups of that name
  32. PCRE2_ERROR_UNAVAILBLE the ovector was too small for that group
  33. PCRE2_ERROR_UNSET the group did not participate in the match
  34. PCRE2_ERROR_NOMEMORY memory could not be obtained
  35. .sp
  36. If there is more than one group with the given name, the first one that is set
  37. is returned. In this situation PCRE2_ERROR_UNSET means that no group with the
  38. given name was set.
  39. .P
  40. There is a complete description of the PCRE2 native API in the
  41. .\" HREF
  42. \fBpcre2api\fP
  43. .\"
  44. page and a description of the POSIX API in the
  45. .\" HREF
  46. \fBpcre2posix\fP
  47. .\"
  48. page.