---
name: "pcre2_jit_match"
section: "3"
platform: "linux"
package: "pcre2"
version: "10.49-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pcre2_jit_match"
---

# pcre2\_jit\_match(3)

Perl-compatible regular expressions (revised API)

## NAME

PCRE2 - Perl-compatible regular expressions (revised API)

## SYNOPSIS

**#include \<pcre2.h\>**

```
int pcre2_jit_match(const pcre2_code *code, PCRE2_SPTR subject,
  PCRE2_SIZE length, PCRE2_SIZE startoffset,
  uint32_t options, pcre2_match_data *match_data,
  pcre2_match_context *mcontext);
```

## DESCRIPTION

This function matches a compiled regular expression that has been successfully processed by the JIT compiler against a given subject string, using a matching algorithm that is similar to Perl's. It is a "fast path" interface to JIT, and it bypasses some of the sanity checks that **pcre2\_match()** applies.

In UTF mode, the subject string is not checked for UTF validity. Unless PCRE2\_MATCH\_INVALID\_UTF was set when the pattern was compiled, passing an invalid UTF string results in undefined behaviour. Your program may crash or loop or give wrong results. In the absence of PCRE2\_MATCH\_INVALID\_UTF you should only call **pcre2\_jit\_match()** in UTF mode if you are sure the subject is valid.

The arguments for **pcre2\_jit\_match()** are exactly the same as for **pcre2\_match()**, except that the subject string must be specified with a length; PCRE2\_ZERO\_TERMINATED is not supported.

The supported options are PCRE2\_NOTBOL, PCRE2\_NOTEOL, PCRE2\_NOTEMPTY, PCRE2\_NOTEMPTY\_ATSTART, PCRE2\_PARTIAL\_HARD, and PCRE2\_PARTIAL\_SOFT. Unsupported options are ignored.

The return values are the same as for **pcre2\_match()** plus PCRE2\_ERROR\_JIT\_BADOPTION if a matching mode (partial or complete) is requested that was not compiled. For details of partial matching, see the **pcre2partial** page.

There is a complete description of the PCRE2 native API in the **pcre2api** page and a description of the JIT API in the **pcre2jit** page.
