class Captures:
    def get(self, i: int) -> Match | None: ...
    def name(self, name: str) -> Match | None: ...
    def expand(self, replacement: str, dst: str) -> str: ...
    def __getitem__(self, i: int) -> Match: ...
    def __len__(self) -> int: ...
    def __repr__(self) -> str: ...


class CapturesIter:
    def __iter__(slf) -> CapturesIter: ...
    def __next__(self) -> Captures: ...
    def __repr__(self) -> str: ...

class Match:
    matched_text: str
    start: int
    end: int
    def __str__(self) -> str: ...
    def __repr__(self) -> str: ...

class Matches:
    def __iter__(self) -> Matches: ...
    def __next__(self) -> Match: ...
    def __repr__(self) -> str: ...

class Regex:
    def __init__(
        self,
        pattern: str,
        *,
        case_insensive: bool | None = None,
        dfa_size_limit: int | None = None,
        dot_matches_new_line: bool | None = None,
        ignore_whitespace: bool | None = None,
        multi_line: bool | None = None,
        nest_limit: int | None = None,
        octal: bool | None = None,
        size_limit: int | None = None,
        swap_greed: bool | None = None,
        unicode: bool | None = None,
    ) -> None: ...
    def is_match(self, text: str, start: int | None = None) -> bool: ...
    def find(self, text: str, start: int | None) -> Match | None: ...
    def find_iter(self, text: str) -> Matches: ...
    def captures(self, text: str) -> Captures | None: ...
    def captures_iter(self, text: str) -> CapturesIter: ...
    def split(self, text: str, limit: int | None = None) -> Split: ...
    def replace(self, text: str, rep: str, limit: int | None = None) -> str: ...
    def __str__(self) -> str: ...
    def __repr__(self) -> str: ...

class Split:
    def __iter__(slf) -> Split: ...
    def __next__(self) -> str: ...
    def __repr__(self) -> str: ...
