-
Notifications
You must be signed in to change notification settings - Fork 0
/
regex_rs.pyi
56 lines (50 loc) · 1.81 KB
/
regex_rs.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: ...