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.

41 lines
1.3 KiB

  1. .TH PCRE2_SUBSTRING_NAMETABLE_SCAN 3 "03 February 2019" "PCRE2 10.33"
  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_nametable_scan(const pcre2_code *\fIcode\fP,
  11. .B " PCRE2_SPTR \fIname\fP, PCRE2_SPTR *\fIfirst\fP, PCRE2_SPTR *\fIlast\fP);"
  12. .fi
  13. .
  14. .SH DESCRIPTION
  15. .rs
  16. .sp
  17. This convenience function finds, for a compiled pattern, the first and last
  18. entries for a given name in the table that translates capture group names into
  19. numbers.
  20. .sp
  21. \fIcode\fP Compiled regular expression
  22. \fIname\fP Name whose entries required
  23. \fIfirst\fP Where to return a pointer to the first entry
  24. \fIlast\fP Where to return a pointer to the last entry
  25. .sp
  26. When the name is found in the table, if \fIfirst\fP is NULL, the function
  27. returns a group number, but if there is more than one matching entry, it is not
  28. defined which one. Otherwise, when both pointers have been set, the yield of
  29. the function is the length of each entry in code units. If the name is not
  30. found, PCRE2_ERROR_NOSUBSTRING is returned.
  31. .P
  32. There is a complete description of the PCRE2 native API, including the format of
  33. the table entries, in the
  34. .\" HREF
  35. \fBpcre2api\fP
  36. .\"
  37. page, and a description of the POSIX API in the
  38. .\" HREF
  39. \fBpcre2posix\fP
  40. .\"
  41. page.