☰

# std/pcre2

Theme:

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit

The following option bits can be passed only to pcre2_compile(). However, they may affect compilation, JIT compilation, and/or interpretive execution. The following tags indicate which:

C alters what is compiled by pcre2_compile() J alters what is compiled by pcre2_jit_compile() M is inspected during pcre2_match() execution D is inspected during pcre2_dfa_match() execution

An additional compile options word is available in the compile context.These are for pcre2_jit_compile().These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and pcre2_substitute(). Some are allowed only for one of the functions, and in these cases it is noted below. Note that ANCHORED, ENDANCHORED and NO_UTF_CHECK can also be passed to these functions (though pcre2_jit_match() ignores the latter since it bypasses all sanity checks).Options for pcre2_pattern_convert().Newline and R settings, for use in compile contexts. The newline values must be kept in step with values set in config.h and both sets must all be greater than zero.Error codes for pcre2_compile(). Some of these are also used by pcre2_pattern_convert().Error 159 is obsolete and should now never occur"Expected" matching error codes: no match and partial match.Error codes for UTF-8 validity checksError codes for UTF-16 validity checksError codes for UTF-32 validity checksMiscellaneous error codes for pcre2_dfa_match(), substring extraction functions, context functions, and serializing functions. They are in numerical order. Originally they were in alphabetical order too, but now that PCRE2 is released, the numbers must not be changed.Request types for pcre2_pattern_info()Request types for pcre2_config().Optimization directives for pcre2_set_optimize(). For binary compatibility, only add to this list; do not renumber.Types used in pcre2_set_substitute_case_callout().

# Types

    CalloutBlock = object
      version*: cint             ## Identifies version of block
      callout_number*: cint      ## Number compiled into pattern
      offset_vector*: ptr cint   ## The offset vector
      subject*: cstring          ## The subject being matched
      subject_length*: cint      ## The length of the subject
      start_match*: cint         ## Offset to start of this match attempt
      current_position*: cint    ## Where we currently are in the subject
      capture_top*: cint         ## Max current capture
      capture_last*: cint        ## Most recently closed capture
      callout_data*: pointer     ## Data passed in with the call
      pattern_position*: cint    ## Offset to next item in the pattern
      next_item_length*: cint    ## Length of next item in the pattern
      mark*: pointer             ## Pointer to current mark or NULL

  Source Edit

    GeneralContext = object

  Source Edit

    JitCallback = proc (a: pointer): ptr JitStack {.cdecl.}

  Source Edit

    JitStack = object

  Source Edit

    JitStack16 = object

  Source Edit

    JitStack32 = object

  Source Edit

    MatchData = object

  Source Edit

    Pcre = object

  Source Edit

    Pcre16 = object

  Source Edit

    Pcre32 = object

  Source Edit

# Consts

    ALLOW_EMPTY_CLASS = 0x00000001'u32

  Source Edit

    ALT_BSUX = 0x00000002'u32

  Source Edit

    ALT_CIRCUMFLEX = 0x00200000'u32

  Source Edit

    ALT_EXTENDED_CLASS = 0x00080000'u32

  Source Edit

    ALT_VERBNAMES = 0x00400000'u32

  Source Edit

    ANCHORED = 0x80000000'u32

  Source Edit

    AUTO_CALLOUT = 0x00000004'u32

  Source Edit

    AUTO_POSSESS = 64

  Source Edit

    AUTO_POSSESS_OFF = 65

  Source Edit

    BSR_ANYCRLF = 2

  Source Edit

    BSR_UNICODE = 1

  Source Edit

    CASELESS = 0x00000008'u32

  Source Edit

    CONFIG_BSR = 0

  Source Edit

    CONFIG_COMPILED_WIDTHS = 14

  Source Edit

    CONFIG_DEPTHLIMIT = 7

  Source Edit

    CONFIG_HEAPLIMIT = 12

  Source Edit

    CONFIG_JIT = 1

  Source Edit

    CONFIG_JITTARGET = 2

  Source Edit

    CONFIG_LINKSIZE = 3

  Source Edit

    CONFIG_MATCHLIMIT = 4

  Source Edit

    CONFIG_NEVER_BACKSLASH_C = 13

  Source Edit

    CONFIG_NEWLINE = 5

  Source Edit

    CONFIG_PARENSLIMIT = 6

  Source Edit

    CONFIG_RECURSIONLIMIT = 7

  Source Edit

    CONFIG_STACKRECURSE = 8

  Source Edit

    CONFIG_TABLES_LENGTH = 15

  Source Edit

    CONFIG_UNICODE = 9

  Source Edit

    CONFIG_UNICODE_VERSION = 10

  Source Edit

    CONFIG_VERSION = 11

  Source Edit

    CONVERT_GLOB = 0x00000010'u32

  Source Edit

    CONVERT_GLOB_NO_STARSTAR = 0x00000050'u32

  Source Edit

    CONVERT_GLOB_NO_WILD_SEPARATOR = 0x00000030'u32

  Source Edit

    CONVERT_NO_UTF_CHECK = 0x00000002'u32

  Source Edit

    CONVERT_POSIX_BASIC = 0x00000004'u32

  Source Edit

    CONVERT_POSIX_EXTENDED = 0x00000008'u32

  Source Edit

    CONVERT_UTF = 0x00000001'u32

  Source Edit

    COPY_MATCHED_SUBJECT = 0x00004000'u32

  Source Edit

    DFA_RESTART = 0x00000040'u32

  Source Edit

    DFA_SHORTEST = 0x00000080'u32

  Source Edit

    DISABLE_RECURSELOOP_CHECK = 0x00040000'u32

  Source Edit

    DOLLAR_ENDONLY = 0x00000010'u32

  Source Edit

    DOTALL = 0x00000020'u32

  Source Edit

    DOTSTAR_ANCHOR = 66

  Source Edit

    DOTSTAR_ANCHOR_OFF = 67

  Source Edit

    DUPNAMES = 0x00000040'u32

  Source Edit

    ENDANCHORED = 0x20000000'u32

  Source Edit

    ERROR_ALPHA_ASSERTION_UNKNOWN = 195

  Source Edit

    ERROR_BACKSLASH_C_CALLER_DISABLED = 183

  Source Edit

    ERROR_BACKSLASH_C_LIBRARY_DISABLED = 185

  Source Edit

    ERROR_BACKSLASH_C_SYNTAX = 168

  Source Edit

    ERROR_BACKSLASH_G_SYNTAX = 157

  Source Edit

    ERROR_BACKSLASH_K_IN_LOOKAROUND = 199

  Source Edit

    ERROR_BACKSLASH_K_SYNTAX = 169

  Source Edit

    ERROR_BACKSLASH_N_IN_CLASS = 171

  Source Edit

    ERROR_BACKSLASH_O_MISSING_BRACE = 155

  Source Edit

    ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG = 177

  Source Edit

    ERROR_BAD_LITERAL_OPTIONS = 192

  Source Edit

    ERROR_BAD_OPTIONS = 117

  Source Edit

    ERROR_BAD_RELATIVE_REFERENCE = 129

  Source Edit

    ERROR_BAD_SUBPATTERN_REFERENCE = 115

  Source Edit

    ERROR_BADDATA = -29

  Source Edit

    ERROR_BADMAGIC = -31

  Source Edit

    ERROR_BADMODE = -32

  Source Edit

    ERROR_BADOFFSET = -33

  Source Edit

    ERROR_BADOFFSETLIMIT = -56

  Source Edit

    ERROR_BADOPTION = -34

  Source Edit

    ERROR_BADREPESCAPE = -57

  Source Edit

    ERROR_BADREPLACEMENT = -35

  Source Edit

    ERROR_BADSERIALIZEDDATA = -62

  Source Edit

    ERROR_BADSUBSPATTERN = -60

  Source Edit

    ERROR_BADSUBSTITUTION = -59

  Source Edit

    ERROR_BADUTFOFFSET = -36

  Source Edit

    ERROR_CALLOUT = -37

  Never used by PCRE2 itself Source Edit

    ERROR_CALLOUT_BAD_STRING_DELIMITER = 182

  Source Edit

    ERROR_CALLOUT_CALLER_DISABLED = 203

  Source Edit

    ERROR_CALLOUT_NO_STRING_DELIMITER = 181

  Source Edit

    ERROR_CALLOUT_NUMBER_TOO_BIG = 138

  Source Edit

    ERROR_CALLOUT_STRING_TOO_LONG = 172

  Source Edit

    ERROR_CLASS_INVALID_RANGE = 150

  Source Edit

    ERROR_CLASS_RANGE_ORDER = 108

  Source Edit

    ERROR_CODE_POINT_TOO_BIG = 134

  Source Edit

    ERROR_CONDITION_ASSERTION_EXPECTED = 128

  Source Edit

    ERROR_CONVERT_SYNTAX = -64

  Source Edit

    ERROR_DEFINE_TOO_MANY_BRANCHES = 154

  Source Edit

    ERROR_DEPTHLIMIT = -53

  Source Edit

    ERROR_DFA_BADRESTART = -38

  Source Edit

    ERROR_DFA_RECURSE = -39

  Source Edit

    ERROR_DFA_UCOND = -40

  Source Edit

    ERROR_DFA_UFUNC = -41

  Source Edit

    ERROR_DFA_UINVALID_UTF = -66

  Source Edit

    ERROR_DFA_UITEM = -42

  Source Edit

    ERROR_DFA_WSSIZE = -43

  Source Edit

    ERROR_DUPLICATE_SUBPATTERN_NAME = 143

  Source Edit

    ERROR_ECLASS_EXPECTED_OPERAND = 210

  Source Edit

    ERROR_ECLASS_HINT_SQUARE_BRACKET = 212

  Source Edit

    ERROR_ECLASS_INVALID_OPERATOR = 208

  Source Edit

    ERROR_ECLASS_MIXED_OPERATORS = 211

  Source Edit

    ERROR_ECLASS_NEST_TOO_DEEP = 207

  Source Edit

    ERROR_ECLASS_UNEXPECTED_OPERATOR = 209

  Source Edit

    ERROR_END_BACKSLASH = 101

  Source Edit

    ERROR_END_BACKSLASH_C = 102

  Source Edit

    ERROR_ESCAPE_INVALID_IN_CLASS = 107

  Source Edit

    ERROR_ESCAPE_INVALID_IN_VERB = 140

  Source Edit

    ERROR_EXTRA_CASING_INCOMPATIBLE = 206

  Source Edit

    ERROR_EXTRA_CASING_REQUIRES_UNICODE = 204

  Source Edit

    ERROR_HEAP_FAILED = 121

  Source Edit

    ERROR_HEAPLIMIT = -63

  Source Edit

    ERROR_INTERNAL = -44

  Source Edit

    ERROR_INTERNAL_BAD_CODE = 189

  Source Edit

    ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS = 180

  Source Edit

    ERROR_INTERNAL_BAD_CODE_IN_SKIP = 190

  Source Edit

    ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS = 170

  Source Edit

    ERROR_INTERNAL_CODE_OVERFLOW = 123

  Source Edit

    ERROR_INTERNAL_DUPMATCH = -65

  Source Edit

    ERROR_INTERNAL_MISSING_SUBPATTERN = 153

  Source Edit

    ERROR_INTERNAL_OVERRAN_WORKSPACE = 152

  Source Edit

    ERROR_INTERNAL_PARSED_OVERFLOW = 163

  Source Edit

    ERROR_INTERNAL_STUDY_ERROR = 131

  Source Edit

    ERROR_INTERNAL_UNEXPECTED_REPEAT = 110

  Source Edit

    ERROR_INTERNAL_UNKNOWN_NEWLINE = 156

  Source Edit

    ERROR_INVALID_AFTER_PARENS_QUERY = 111

  Source Edit

    ERROR_INVALID_HEXADECIMAL = 167

  Source Edit

    ERROR_INVALID_HYPHEN_IN_OPTIONS = 194

  Source Edit

    ERROR_INVALID_OCTAL = 164

  Source Edit

    ERROR_INVALID_SUBPATTERN_NAME = 144

  Source Edit

    ERROR_INVALIDOFFSET = -67

  Source Edit

    ERROR_JIT_BADOPTION = -45

  Source Edit

    ERROR_JIT_STACKLIMIT = -46

  Source Edit

    ERROR_JIT_UNSUPPORTED = -68

  Source Edit

    ERROR_LOOKBEHIND_INVALID_BACKSLASH_C = 136

  Source Edit

    ERROR_LOOKBEHIND_NOT_FIXED_LENGTH = 125

  Source Edit

    ERROR_LOOKBEHIND_TOO_COMPLICATED = 135

  Source Edit

    ERROR_LOOKBEHIND_TOO_LONG = 187

  Source Edit

    ERROR_MALFORMED_UNICODE_PROPERTY = 146

  Source Edit

    ERROR_MARK_MISSING_ARGUMENT = 166

  Source Edit

    ERROR_MATCHLIMIT = -47

  Source Edit

    ERROR_MAX_VAR_LOOKBEHIND_EXCEEDED = 200

  Source Edit

    ERROR_MISSING_CALLOUT_CLOSING = 139

  Source Edit

    ERROR_MISSING_CLOSING_PARENTHESIS = 114

  Source Edit

    ERROR_MISSING_COMMENT_CLOSING = 118

  Source Edit

    ERROR_MISSING_CONDITION_CLOSING = 124

  Source Edit

    ERROR_MISSING_NAME_TERMINATOR = 142

  Source Edit

    ERROR_MISSING_OCTAL_DIGIT = 198

  Source Edit

    ERROR_MISSING_OCTAL_OR_HEX_DIGITS = 178

  Source Edit

    ERROR_MISSING_SQUARE_BRACKET = 106

  Source Edit

    ERROR_MIXEDTABLES = -30

  Name was changed Source Edit

    ERROR_NO_SURROGATES_IN_UTF16 = 191

  Source Edit

    ERROR_NOMATCH = -1

  Source Edit

    ERROR_NOMEMORY = -48

  Source Edit

    ERROR_NOSUBSTRING = -49

  Source Edit

    ERROR_NOUNIQUESUBSTRING = -50

  Source Edit

    ERROR_NULL = -51

  Source Edit

    ERROR_NULL_PATTERN = 116

  Source Edit

    ERROR_OCTAL_BYTE_TOO_BIG = 151

  Source Edit

    ERROR_OVERSIZE_PYTHON_OCTAL = 202

  Source Edit

    ERROR_PARENS_QUERY_R_MISSING_CLOSING = 158

  Source Edit

    ERROR_PARENTHESES_NEST_TOO_DEEP = 119

  Source Edit

    ERROR_PARENTHESES_STACK_CHECK = 133

  Source Edit

    ERROR_PARTIAL = -2

  Source Edit

    ERROR_PATTERN_COMPILED_SIZE_TOO_BIG = 201

  Source Edit

    ERROR_PATTERN_STRING_TOO_LONG = 188

  Source Edit

    ERROR_PATTERN_TOO_COMPLICATED = 186

  Source Edit

    ERROR_PATTERN_TOO_LARGE = 120

  Source Edit

    ERROR_POSIX_CLASS_NOT_IN_CLASS = 112

  Source Edit

    ERROR_POSIX_NO_SUPPORT_COLLATING = 113

  Source Edit

    ERROR_QUANTIFIER_INVALID = 109

  Source Edit

    ERROR_QUANTIFIER_OUT_OF_ORDER = 104

  Source Edit

    ERROR_QUANTIFIER_TOO_BIG = 105

  Source Edit

    ERROR_QUERY_BARJX_NEST_TOO_DEEP = 184

  Source Edit

    ERROR_RECURSELOOP = -52

  Source Edit

    ERROR_RECURSIONLIMIT = -53

  Obsolete synonym Source Edit

    ERROR_REPMISSINGBRACE = -58

  Source Edit

    ERROR_SCRIPT_RUN_NOT_AVAILABLE = 196

  Source Edit

    ERROR_SUBPATTERN_NAME_EXPECTED = 162

  Source Edit

    ERROR_SUBPATTERN_NAME_TOO_LONG = 148

  Source Edit

    ERROR_SUBPATTERN_NAMES_MISMATCH = 165

  Source Edit

    ERROR_SUBPATTERN_NUMBER_TOO_BIG = 161

  Source Edit

    ERROR_SUPPORTED_ONLY_IN_UNICODE = 193

  Source Edit

    ERROR_TOO_MANY_CAPTURES = 197

  Source Edit

    ERROR_TOO_MANY_CONDITION_BRANCHES = 127

  Source Edit

    ERROR_TOO_MANY_NAMED_SUBPATTERNS = 149

  Source Edit

    ERROR_TOOMANYREPLACE = -61

  Source Edit

    ERROR_TURKISH_CASING_REQUIRES_UTF = 205

  Source Edit

    ERROR_UCP_IS_DISABLED = 175

  Source Edit

    ERROR_UNAVAILABLE = -54

  Source Edit

    ERROR_UNICODE_DISALLOWED_CODE_POINT = 173

  Source Edit

    ERROR_UNICODE_NOT_SUPPORTED = 132

  Source Edit

    ERROR_UNICODE_PROPERTIES_UNAVAILABLE = 145

  Source Edit

    ERROR_UNKNOWN_ESCAPE = 103

  Source Edit

    ERROR_UNKNOWN_POSIX_CLASS = 130

  Source Edit

    ERROR_UNKNOWN_UNICODE_PROPERTY = 147

  Source Edit

    ERROR_UNMATCHED_CLOSING_PARENTHESIS = 122

  Source Edit

    ERROR_UNRECOGNIZED_AFTER_QUERY_P = 141

  Source Edit

    ERROR_UNSET = -55

  Source Edit

    ERROR_UNSUPPORTED_ESCAPE_SEQUENCE = 137

  Source Edit

    ERROR_UTF8_ERR1 = -3

  Source Edit

    ERROR_UTF8_ERR2 = -4

  Source Edit

    ERROR_UTF8_ERR3 = -5

  Source Edit

    ERROR_UTF8_ERR4 = -6

  Source Edit

    ERROR_UTF8_ERR5 = -7

  Source Edit

    ERROR_UTF8_ERR6 = -8

  Source Edit

    ERROR_UTF8_ERR7 = -9

  Source Edit

    ERROR_UTF8_ERR8 = -10

  Source Edit

    ERROR_UTF8_ERR9 = -11

  Source Edit

    ERROR_UTF8_ERR10 = -12

  Source Edit

    ERROR_UTF8_ERR11 = -13

  Source Edit

    ERROR_UTF8_ERR12 = -14

  Source Edit

    ERROR_UTF8_ERR13 = -15

  Source Edit

    ERROR_UTF8_ERR14 = -16

  Source Edit

    ERROR_UTF8_ERR15 = -17

  Source Edit

    ERROR_UTF8_ERR16 = -18

  Source Edit

    ERROR_UTF8_ERR17 = -19

  Source Edit

    ERROR_UTF8_ERR18 = -20

  Source Edit

    ERROR_UTF8_ERR19 = -21

  Source Edit

    ERROR_UTF8_ERR20 = -22

  Source Edit

    ERROR_UTF8_ERR21 = -23

  Source Edit

    ERROR_UTF16_ERR1 = -24

  Source Edit

    ERROR_UTF16_ERR2 = -25

  Source Edit

    ERROR_UTF16_ERR3 = -26

  Source Edit

    ERROR_UTF32_ERR1 = -27

  Source Edit

    ERROR_UTF32_ERR2 = -28

  Source Edit

    ERROR_UTF_IS_DISABLED = 174

  Source Edit

    ERROR_VERB_ARGUMENT_NOT_ALLOWED = 159

  Source Edit

    ERROR_VERB_NAME_TOO_LONG = 176

  Source Edit

    ERROR_VERB_UNKNOWN = 160

  Source Edit

    ERROR_VERSION_CONDITION_SYNTAX = 179

  Source Edit

    ERROR_ZERO_RELATIVE_REFERENCE = 126

  Source Edit

    EXTENDED = 0x00000080'u32

  Source Edit

    EXTENDED_MORE = 0x01000000'u32

  Source Edit

    EXTRA_ALLOW_LOOKAROUND_BSK = 0x00000040'u32

  Source Edit

    EXTRA_ALLOW_SURROGATE_ESCAPES = 0x00000001'u32

  Source Edit

    EXTRA_ALT_BSUX = 0x00000020'u32

  Source Edit

    EXTRA_ASCII_BSD = 0x00000100'u32

  Source Edit

    EXTRA_ASCII_BSS = 0x00000200'u32

  Source Edit

    EXTRA_ASCII_BSW = 0x00000400'u32

  Source Edit

    EXTRA_ASCII_DIGIT = 0x00001000'u32

  Source Edit

    EXTRA_ASCII_POSIX = 0x00000800'u32

  Source Edit

    EXTRA_BAD_ESCAPE_IS_LITERAL = 0x00000002'u32

  Source Edit

    EXTRA_CASELESS_RESTRICT = 0x00000080'u32

  Source Edit

    EXTRA_ESCAPED_CR_IS_LF = 0x00000010'u32

  Source Edit

    EXTRA_MATCH_LINE = 0x00000008'u32

  Source Edit

    EXTRA_MATCH_WORD = 0x00000004'u32

  Source Edit

    EXTRA_NEVER_CALLOUT = 0x00008000'u32

  Source Edit

    EXTRA_NO_BS0 = 0x00004000'u32

  Source Edit

    EXTRA_PYTHON_OCTAL = 0x00002000'u32

  Source Edit

    EXTRA_TURKISH_CASING = 0x00010000'u32

  Source Edit

    FIRSTLINE = 0x00000100'u32

  Source Edit

    INFO_ALLOPTIONS = 0

  Source Edit

    INFO_ARGOPTIONS = 1

  Source Edit

    INFO_BACKREFMAX = 2

  Source Edit

    INFO_BSR = 3

  Source Edit

    INFO_CAPTURECOUNT = 4

  Source Edit

    INFO_DEPTHLIMIT = 21

  Source Edit

    INFO_EXTRAOPTIONS = 26

  Source Edit

    INFO_FIRSTBITMAP = 7

  Source Edit

    INFO_FIRSTCODETYPE = 6

  Source Edit

    INFO_FIRSTCODEUNIT = 5

  Source Edit

    INFO_FRAMESIZE = 24

  Source Edit

    INFO_HASBACKSLASHC = 23

  Source Edit

    INFO_HASCRORLF = 8

  Source Edit

    INFO_HEAPLIMIT = 25

  Source Edit

    INFO_JCHANGED = 9

  Source Edit

    INFO_JITSIZE = 10

  Source Edit

    INFO_LASTCODETYPE = 12

  Source Edit

    INFO_LASTCODEUNIT = 11

  Source Edit

    INFO_MATCHEMPTY = 13

  Source Edit

    INFO_MATCHLIMIT = 14

  Source Edit

    INFO_MAXLOOKBEHIND = 15

  Source Edit

    INFO_MINLENGTH = 16

  Source Edit

    INFO_NAMECOUNT = 17

  Source Edit

    INFO_NAMEENTRYSIZE = 18

  Source Edit

    INFO_NAMETABLE = 19

  Source Edit

    INFO_NEWLINE = 20

  Source Edit

    INFO_RECURSIONLIMIT = 21

  Source Edit

    INFO_SIZE = 22

  Source Edit

    JIT_COMPLETE = 0x00000001'u32

  Source Edit

    JIT_INVALID_UTF = 0x00000100'u32

  Source Edit

    JIT_PARTIAL_HARD = 0x00000004'u32

  Source Edit

    JIT_PARTIAL_SOFT = 0x00000002'u32

  Source Edit

    JIT_TEST_ALLOC = 0x00000200'u32

  Source Edit

    LITERAL = 0x02000000'u32

  Source Edit

    MATCH_INVALID_UTF = 0x00400000'u32

  Source Edit

    MATCH_UNSET_BACKREF = 0x00000200'u32

  Source Edit

    MULTILINE = 0x00000400'u32

  Source Edit

    NEVER_BACKSLASH_C = 0x00100000'u32

  Source Edit

    NEVER_UCP = 0x00000800'u32

  Source Edit

    NEVER_UTF = 0x00001000'u32

  Source Edit

    NEWLINE_ANY = 4

  Source Edit

    NEWLINE_ANYCRLF = 5

  Source Edit

    NEWLINE_CR = 1

  Source Edit

    NEWLINE_CRLF = 3

  Source Edit

    NEWLINE_LF = 2

  Source Edit

    NEWLINE_NUL = 6

  Source Edit

    NO_AUTO_CAPTURE = 0x00002000'u32

  Source Edit

    NO_AUTO_POSSESS = 0x00004000'u32

  Source Edit

    NO_DOTSTAR_ANCHOR = 0x00008000'u32

  Source Edit

    NO_JIT = 0x00002000'u32

  Source Edit

    NO_START_OPTIMIZE = 0x00010000'u32

  Source Edit

    NO_UTF_CHECK = 0x40000000'u32

  Source Edit

    NOTBOL = 0x00000001'u32

  Source Edit

    NOTEMPTY = 0x00000004'u32

  Source Edit

    NOTEMPTY_ATSTART = 0x00000008'u32

  Source Edit

    NOTEOL = 0x00000002'u32

  Source Edit

    OPTIMIZATION_FULL = 1

  Source Edit

    OPTIMIZATION_NONE = 0

  Source Edit

    PARTIAL_HARD = 0x00000020'u32

  Source Edit

    PARTIAL_SOFT = 0x00000010'u32

  Source Edit

    PCRE2_DATE = "2024-06-09"

  Source Edit

    PCRE2_MAJOR = 10

  Source Edit

    PCRE2_MINOR = 45

  Source Edit

    PCRE2_PRERELEASE = true

  Source Edit

    START_OPTIMIZE = 68

  Source Edit

    START_OPTIMIZE_OFF = 69

  Source Edit

    SUBSTITUTE_CASE_LOWER = 0

  Source Edit

    SUBSTITUTE_CASE_TITLE = 2

  Source Edit

    SUBSTITUTE_CASE_UPPER = 1

  Source Edit

    SUBSTITUTE_EXTENDED = 0x00000200'u32

  Source Edit

    SUBSTITUTE_GLOBAL = 0x00000100'u32

  Source Edit

    SUBSTITUTE_LITERAL = 0x00008000'u32

  Source Edit

    SUBSTITUTE_MATCHED = 0x00010000'u32

  Source Edit

    SUBSTITUTE_OVERFLOW_LENGTH = 0x00001000'u32

  Source Edit

    SUBSTITUTE_REPLACEMENT_ONLY = 0x00020000'u32

  Source Edit

    SUBSTITUTE_UNKNOWN_UNSET = 0x00000800'u32

  Source Edit

    SUBSTITUTE_UNSET_EMPTY = 0x00000400'u32

  Source Edit

    UCP = 0x00020000'u32

  Source Edit

    UNGREEDY = 0x00040000'u32

  Source Edit

    UNSET = 18446744073709551615'u

  Source Edit

    USE_OFFSET_LIMIT = 0x00800000'u32

  Source Edit

    UTF = 0x00080000'u32

  Source Edit

    ZERO_TERMINATED = 18446744073709551615'u

  Source Edit

# Procs

    proc code_free(code: ptr Pcre) {.cdecl, importc: "pcre2_$1_8", ...raises: [],
                                     tags: [], forbids: [].}

  Source Edit

    proc compile(pattern: cstring; options: csize_t; flags: uint32;
                 errorCode: ptr cint; offset: ptr csize_t; tableptr: pointer): ptr Pcre {.
        cdecl, importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc config(what: uint32; where: pointer): cint {.cdecl, importc: "pcre2_$1_8",
        ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc dfa_match(code: ptr Pcre; subject: cstring; length: csize_t;
                   startoffset: csize_t; options: uint32; ovector: ptr MatchData;
                   ovecsize: pointer; workspace: ptr cint; wscount: csize_t): cint {.
        cdecl, importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc get_ovector_count(ovector: ptr MatchData): uint32 {.cdecl,
        importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc get_ovector_pointer(ovector: ptr MatchData): ptr csize_t {.cdecl,
        importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc jit_compile(code: ptr Pcre; options: uint32): cint {.cdecl,
        importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc jit_match(code: ptr Pcre; subject: cstring; length: csize_t;
                   startoffset: csize_t; options: uint32; ovector: ptr MatchData;
                   ovecsize: pointer): cint {.cdecl, importc: "pcre2_$1_8",
        ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc match(code: ptr Pcre; subject: cstring; length: csize_t;
               startoffset: csize_t; options: uint32; ovector: ptr MatchData;
               ovecsize: pointer): cint {.cdecl, importc: "pcre2_$1_8", ...raises: [],
                                          tags: [], forbids: [].}

  Source Edit

    proc match_data_create(size: uint32; ctx: ptr GeneralContext): ptr MatchData {.
        cdecl, importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc match_data_create_from_pattern(code: ptr Pcre; ctx: ptr GeneralContext): ptr MatchData {.
        cdecl, importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc match_data_free(data: ptr MatchData) {.cdecl, importc: "pcre2_$1_8",
        ...raises: [], tags: [], forbids: [].}

  Source Edit

    proc pattern_info(code: ptr Pcre; what: uint32; where: pointer): cint {.cdecl,
        importc: "pcre2_$1_8", ...raises: [], tags: [], forbids: [].}

  Source Edit