:right-sidebar: True Regex =================================================================== .. currentmodule:: gi.repository.GObject .. class:: Regex(**kwargs) :no-contents-entry: :Constructors: :: new(pattern:str, compile_options:GLib.RegexCompileFlags, match_options:GLib.RegexMatchFlags) -> GLib.Regex or None Constructors ------------ .. rst-class:: interim-class .. class:: Regex :no-index: .. classmethod:: new(pattern: str, compile_options: ~gi.repository.GLib.RegexCompileFlags, match_options: ~gi.repository.GLib.RegexMatchFlags) -> ~gi.repository.GLib.Regex | None :param pattern: :param compile_options: :param match_options: Methods ------- .. rst-class:: interim-class .. class:: Regex :no-index: .. method:: check_replacement(replacement: str) -> tuple[bool, bool] :param replacement: .. method:: error_quark() -> int .. method:: escape_nul(string: str, length: int) -> str :param string: :param length: .. method:: escape_string(string: str, length: int) -> str :param string: :param length: .. method:: get_capture_count() -> int .. method:: get_compile_flags() -> ~gi.repository.GLib.RegexCompileFlags .. method:: get_has_cr_or_lf() -> bool .. method:: get_match_flags() -> ~gi.repository.GLib.RegexMatchFlags .. method:: get_max_backref() -> int .. method:: get_max_lookbehind() -> int .. method:: get_pattern() -> str .. method:: get_string_number(name: str) -> int :param name: .. method:: match(string: str, match_options: ~gi.repository.GLib.RegexMatchFlags) -> tuple[bool, ~gi.repository.GLib.MatchInfo] :param string: :param match_options: .. method:: match_all(string: str, match_options: ~gi.repository.GLib.RegexMatchFlags) -> tuple[bool, ~gi.repository.GLib.MatchInfo] :param string: :param match_options: .. method:: match_all_full(string: ~typing.Sequence[str], start_position: int, match_options: ~gi.repository.GLib.RegexMatchFlags) -> tuple[bool, ~gi.repository.GLib.MatchInfo] :param string: :param start_position: :param match_options: .. method:: match_full(string: ~typing.Sequence[str], start_position: int, match_options: ~gi.repository.GLib.RegexMatchFlags) -> tuple[bool, ~gi.repository.GLib.MatchInfo] :param string: :param start_position: :param match_options: .. method:: match_simple(pattern: str, string: str, compile_options: ~gi.repository.GLib.RegexCompileFlags, match_options: ~gi.repository.GLib.RegexMatchFlags) -> bool :param pattern: :param string: :param compile_options: :param match_options: .. method:: replace(string: ~typing.Sequence[str], start_position: int, replacement: str, match_options: ~gi.repository.GLib.RegexMatchFlags) -> str :param string: :param start_position: :param replacement: :param match_options: .. method:: replace_eval(string: ~typing.Sequence[str], start_position: int, match_options: ~gi.repository.GLib.RegexMatchFlags, eval: ~typing.Callable[[...], bool], *user_data: ~typing.Any) -> str :param string: :param start_position: :param match_options: :param eval: :param user_data: .. method:: replace_literal(string: ~typing.Sequence[str], start_position: int, replacement: str, match_options: ~gi.repository.GLib.RegexMatchFlags) -> str :param string: :param start_position: :param replacement: :param match_options: .. method:: split(string: str, match_options: ~gi.repository.GLib.RegexMatchFlags) -> list[str] :param string: :param match_options: .. method:: split_full(string: ~typing.Sequence[str], start_position: int, match_options: ~gi.repository.GLib.RegexMatchFlags, max_tokens: int) -> list[str] :param string: :param start_position: :param match_options: :param max_tokens: .. method:: split_simple(pattern: str, string: str, compile_options: ~gi.repository.GLib.RegexCompileFlags, match_options: ~gi.repository.GLib.RegexMatchFlags) -> list[str] :param pattern: :param string: :param compile_options: :param match_options: