Regex
- class Regex(**kwargs)
- Constructors:
new(pattern:str, compile_options:GLib.RegexCompileFlags, match_options:GLib.RegexMatchFlags) -> GLib.Regex or None
Constructors
- class Regex
- classmethod new(pattern: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags) Regex | None
- Parameters:
pattern
compile_options
match_options
Methods
- class Regex
-
- get_compile_flags() RegexCompileFlags
- get_match_flags() RegexMatchFlags
- match(string: str, match_options: RegexMatchFlags) tuple[bool, MatchInfo]
- Parameters:
string
match_options
- match_all(string: str, match_options: RegexMatchFlags) tuple[bool, MatchInfo]
- Parameters:
string
match_options
- match_all_full(string: Sequence[str], start_position: int, match_options: RegexMatchFlags) tuple[bool, MatchInfo]
- Parameters:
string
start_position
match_options
- match_full(string: Sequence[str], start_position: int, match_options: RegexMatchFlags) tuple[bool, MatchInfo]
- Parameters:
string
start_position
match_options
- match_simple(pattern: str, string: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags) bool
- Parameters:
pattern
string
compile_options
match_options
- replace(string: Sequence[str], start_position: int, replacement: str, match_options: RegexMatchFlags) str
- Parameters:
string
start_position
replacement
match_options
- replace_eval(string: Sequence[str], start_position: int, match_options: RegexMatchFlags, eval: Callable[[...], bool], *user_data: Any) str
- Parameters:
string
start_position
match_options
eval
user_data
- replace_literal(string: Sequence[str], start_position: int, replacement: str, match_options: RegexMatchFlags) str
- Parameters:
string
start_position
replacement
match_options
- split(string: str, match_options: RegexMatchFlags) list[str]
- Parameters:
string
match_options
- split_full(string: Sequence[str], start_position: int, match_options: RegexMatchFlags, max_tokens: int) list[str]
- Parameters:
string
start_position
match_options
max_tokens
- split_simple(pattern: str, string: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags) list[str]
- Parameters:
pattern
string
compile_options
match_options