Regex
- class Regex(*args, **kwargs)
- Constructors:
new_for_match(pattern:str, pattern_length:int, flags:int) -> Vte.Regex
new_for_search(pattern:str, pattern_length:int, flags:int) -> Vte.Regex
Constructors
- class Regex
- classmethod new_for_match(pattern: str, pattern_length: int, flags: int) Regex
Compiles
pattern
into a regex for use as a match regex withmatch_add_regex()
or vte_terminal_event_check_regex_simple().See man:pcre2pattern(3) for information about the supported regex language.
The regex will be compiled using <literal>PCRE2_UTF</literal> and possibly other flags, in addition to the flags supplied in
flags
.- Parameters:
pattern – a regex pattern string
pattern_length – the length of
pattern
in bytes, or -1 if the string is NUL-terminated and the length is unknownflags – PCRE2 compile flags
- classmethod new_for_search(pattern: str, pattern_length: int, flags: int) Regex
Compiles
pattern
into a regex for use as a search regex withsearch_set_regex()
.See man:pcre2pattern(3) for information about the supported regex language.
The regex will be compiled using <literal>PCRE2_UTF</literal> and possibly other flags, in addition to the flags supplied in
flags
.- Parameters:
pattern – a regex pattern string
pattern_length – the length of
pattern
in bytes, or -1 if the string is NUL-terminated and the length is unknownflags – PCRE2 compile flags