{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type MatchResult = {\n    match: string,\n    start: number,\n    finish: number,\n}",
          "name": "MatchResult",
          "tags": [],
          "source": {
            "path": "",
            "line": 86
          },
          "fields": [
            {
              "lua_type": "match: string",
              "name": "match",
              "desc": ""
            },
            {
              "lua_type": "start: number",
              "name": "start",
              "desc": ""
            },
            {
              "lua_type": "finish: number",
              "name": "finish",
              "desc": ""
            }
          ],
          "desc": "Result of a regex match operation.\n"
        }
      ],
      "name": "@eryx/regex",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 99
          },
          "is_method": false,
          "signature": "regex.new(\n    pattern: string,  -- the PCRE2 regular expression\n    flags: string?  -- flag characters: i, m, s, x, u, U, n\n) → (\n      -- Regex \n)",
          "owner": "regex",
          "desc": "Compile a regex pattern into a reusable Regex object.",
          "tags": [],
          "name": "new",
          "return_str": "Regex",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Regex",
              "desc": "Regex "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters: i, m, s, x, u, U, n"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 111
          },
          "is_method": false,
          "signature": "regex.isMatch(\n    pattern: string,  -- the PCRE2 regular expression\n    subject: string,  -- the string to test\n    flags: string?  -- flag characters\n) → (\n      -- boolean \n)",
          "owner": "regex",
          "desc": "Test if a pattern matches a subject. Convenience function that\ncompiles the pattern each call; use `regex.new()` for repeated use.",
          "tags": [],
          "name": "isMatch",
          "return_str": "boolean",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "boolean",
              "desc": "boolean "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to test"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 122
          },
          "is_method": false,
          "signature": "regex.find(\n    pattern: string,  -- the PCRE2 regular expression\n    subject: string,  -- the string to search\n    flags: string?  -- flag characters\n) → (\n      -- MatchResult? \n)",
          "owner": "regex",
          "desc": "Find the first match of a pattern in a subject.",
          "tags": [],
          "name": "find",
          "return_str": "MatchResult?",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "MatchResult?",
              "desc": "MatchResult? "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to search"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 133
          },
          "is_method": false,
          "signature": "regex.findAll(\n    pattern: string,  -- the PCRE2 regular expression\n    subject: string,  -- the string to search\n    flags: string?  -- flag characters\n) → (\n      -- {MatchResult} \n)",
          "owner": "regex",
          "desc": "Find all non-overlapping matches of a pattern in a subject.",
          "tags": [],
          "name": "findAll",
          "return_str": "{ MatchResult }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ MatchResult }",
              "desc": "{MatchResult} "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to search"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 146
          },
          "is_method": false,
          "signature": "regex.replace(\n    pattern: string,  -- the PCRE2 regular expression\n    subject: string,  -- the input string\n    replacement: string,  -- the replacement template\n    flags: string?  -- flag characters\n) → (\n      -- string \n)",
          "owner": "regex",
          "desc": "Replace all matches of a pattern in a subject.\nReplacement supports `$0`, `$1`, `${name}` backreferences.",
          "tags": [],
          "name": "replace",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": "string "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the input string"
            },
            {
              "lua_type": "string",
              "name": "replacement",
              "desc": "the replacement template"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 157
          },
          "is_method": false,
          "signature": "regex.split(\n    pattern: string,  -- the PCRE2 regular expression\n    subject: string,  -- the string to split\n    flags: string?  -- flag characters\n) → (\n      -- {string} \n)",
          "owner": "regex",
          "desc": "Split a subject on all matches of a pattern.",
          "tags": [],
          "name": "split",
          "return_str": "{ string }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ string }",
              "desc": "{string} "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "pattern",
              "desc": "the PCRE2 regular expression"
            },
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to split"
            },
            {
              "lua_type": "string?",
              "name": "flags",
              "desc": "flag characters"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 167
          },
          "is_method": false,
          "signature": "regex.escape(\n    str: string  -- the string to escape\n) → (\n      -- string \n)",
          "owner": "regex",
          "desc": "Escape all PCRE2 metacharacters in a string so it can be used\nas a literal pattern.",
          "tags": [],
          "name": "escape",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": "string "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "str",
              "desc": "the string to escape"
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "PCRE2-based regular expression module.\nSupports Perl-compatible regex with compilation, matching, searching,\nreplacement, and splitting.\n\nFlags string characters:\n- `i` = case-insensitive\n- `m` = multiline (^ and $ match line boundaries)\n- `s` = dotall (. matches newlines)\n- `x` = extended (ignore whitespace and # comments in pattern)\n- `u` = UTF-8 mode\n- `U` = ungreedy (swap greediness of quantifiers)\n- `n` = no auto capture (plain parentheses don't capture)\n"
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 21
      },
      "tags": [],
      "properties": [],
      "desc": "A compiled regular expression pattern.\n",
      "name": "Regex",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 28
          },
          "is_method": true,
          "signature": "Regex:isMatch(\n    subject: string,  -- the string to test\n    offset: number?  -- 1-based start position (default 1)\n) → (\n      -- boolean \n)",
          "desc": "Test if the subject matches this pattern.",
          "tags": [],
          "name": "isMatch",
          "return_str": "boolean",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "boolean",
              "desc": "boolean "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to test"
            },
            {
              "lua_type": "number?",
              "name": "offset",
              "desc": "1-based start position (default 1)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 42
          },
          "is_method": true,
          "signature": "Regex:find(\n    subject: string,  -- the string to search\n    offset: number?  -- 1-based start position (default 1)\n) → (\n      -- MatchResult? \n)",
          "desc": "Find the first match of this pattern in the subject.\nReturns nil if no match. The result table contains:\n- `match`: the full matched text\n- `start`: 1-based start position\n- `finish`: 1-based end position (inclusive)\n- `[1]`, `[2]`, ...: numbered capture groups\n- named fields for named capture groups",
          "tags": [],
          "name": "find",
          "return_str": "MatchResult?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "MatchResult?",
              "desc": "MatchResult? "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to search"
            },
            {
              "lua_type": "number?",
              "name": "offset",
              "desc": "1-based start position (default 1)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 49
          },
          "is_method": true,
          "signature": "Regex:findAll(\n    subject: string  -- the string to search\n) → (\n      -- {MatchResult} \n)",
          "desc": "Find all non-overlapping matches in the subject.",
          "tags": [],
          "name": "findAll",
          "return_str": "{ MatchResult }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ MatchResult }",
              "desc": "{MatchResult} "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to search"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 59
          },
          "is_method": true,
          "signature": "Regex:replace(\n    subject: string,  -- the input string\n    replacement: string,  -- the replacement template\n    limit: number?  -- max replacements (0 or nil = replace all)\n) → (\n      -- string \n)",
          "desc": "Replace matches in the subject with a replacement string.\nThe replacement supports `$0` (full match), `$1`, `${name}` backreferences.",
          "tags": [],
          "name": "replace",
          "return_str": "string",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string",
              "desc": "string "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the input string"
            },
            {
              "lua_type": "string",
              "name": "replacement",
              "desc": "the replacement template"
            },
            {
              "lua_type": "number?",
              "name": "limit",
              "desc": "max replacements (0 or nil = replace all)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 68
          },
          "is_method": true,
          "signature": "Regex:split(\n    subject: string,  -- the string to split\n    limit: number?  -- max number of pieces (0 or nil = no limit)\n) → (\n      -- {string} \n)",
          "desc": "Split the subject on matches of this pattern.\nIf the pattern has captures, captured groups are included between splits.",
          "tags": [],
          "name": "split",
          "return_str": "{ string }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ string }",
              "desc": "{string} "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "subject",
              "desc": "the string to split"
            },
            {
              "lua_type": "number?",
              "name": "limit",
              "desc": "max number of pieces (0 or nil = no limit)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 74
          },
          "is_method": true,
          "signature": "Regex:captureCount() → (\n      -- number \n)",
          "desc": "Return the number of capture groups in the pattern.",
          "tags": [],
          "name": "captureCount",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": "number "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 80
          },
          "is_method": true,
          "signature": "Regex:namedCaptures() → (\n      -- {[string]: number} \n)",
          "desc": "Return a table mapping named capture group names to their group numbers.",
          "tags": [],
          "name": "namedCaptures",
          "return_str": "{ [string]: number }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ [string]: number }",
              "desc": "{[string]: number} "
            }
          ],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}