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: list[str], start_position: int, match_options: RegexMatchFlags) Tuple[bool, MatchInfo] #
- Parameters:
string
start_position
match_options
- match_full(string: list[str], start_position: int, match_options: RegexMatchFlags) Tuple[bool, MatchInfo] #
- Parameters:
string
start_position
match_options
- classmethod match_simple(string: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags) bool #
- Parameters:
string
compile_options
match_options
- replace(string: list[str], start_position: int, replacement: str, match_options: RegexMatchFlags) str #
- Parameters:
string
start_position
replacement
match_options
- replace_eval(string: list[str], start_position: int, match_options: RegexMatchFlags, eval: Callable[[MatchInfo, String, Any], bool], user_data: Any = None) str #
- Parameters:
string
start_position
match_options
eval
user_data
- replace_literal(string: list[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: list[str], start_position: int, match_options: RegexMatchFlags, max_tokens: int) list[str] #
- Parameters:
string
start_position
match_options
max_tokens
- classmethod split_simple(string: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags) list[str] #
- Parameters:
string
compile_options
match_options