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.

58 lines
1.9 KiB

  1. .TH PCRE2_JIT_MATCH 3 "20 January 2023" "PCRE2 10.43"
  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_jit_match(const pcre2_code *\fIcode\fP, PCRE2_SPTR \fIsubject\fP,
  11. .B " PCRE2_SIZE \fIlength\fP, PCRE2_SIZE \fIstartoffset\fP,"
  12. .B " uint32_t \fIoptions\fP, pcre2_match_data *\fImatch_data\fP,"
  13. .B " pcre2_match_context *\fImcontext\fP);"
  14. .fi
  15. .
  16. .SH DESCRIPTION
  17. .rs
  18. .sp
  19. This function matches a compiled regular expression that has been successfully
  20. processed by the JIT compiler against a given subject string, using a matching
  21. algorithm that is similar to Perl's. It is a "fast path" interface to JIT, and
  22. it bypasses some of the sanity checks that \fBpcre2_match()\fP applies.
  23. .P
  24. In UTF mode, the subject string is not checked for UTF validity. Unless
  25. PCRE2_MATCH_INVALID_UTF was set when the pattern was compiled, passing an
  26. invalid UTF string results in undefined behaviour. Your program may crash or
  27. loop or give wrong results. In the absence of PCRE2_MATCH_INVALID_UTF you
  28. should only call \fBpcre2_jit_match()\fP in UTF mode if you are sure the
  29. subject is valid.
  30. .P
  31. The arguments for \fBpcre2_jit_match()\fP are exactly the same as for
  32. .\" HREF
  33. \fBpcre2_match()\fP,
  34. .\"
  35. except that the subject string must be specified with a length;
  36. PCRE2_ZERO_TERMINATED is not supported.
  37. .P
  38. The supported options are PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY,
  39. PCRE2_NOTEMPTY_ATSTART, PCRE2_PARTIAL_HARD, and PCRE2_PARTIAL_SOFT. Unsupported
  40. options are ignored.
  41. .P
  42. The return values are the same as for \fBpcre2_match()\fP plus
  43. PCRE2_ERROR_JIT_BADOPTION if a matching mode (partial or complete) is requested
  44. that was not compiled. For details of partial matching, see the
  45. .\" HREF
  46. \fBpcre2partial\fP
  47. .\"
  48. page.
  49. .P
  50. There is a complete description of the PCRE2 native API in the
  51. .\" HREF
  52. \fBpcre2api\fP
  53. .\"
  54. page and a description of the JIT API in the
  55. .\" HREF
  56. \fBpcre2jit\fP
  57. .\"
  58. page.