Vte.Regex¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
Details¶
- class Vte.Regex¶
- classmethod new_for_match(pattern, pattern_length, flags)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Compiles pattern into a regex for use as a match regex with
Vte.Terminal.match_add_regex
() or vte_terminal_event_check_regex_simple().See man:pcre2pattern(3) for information about the supported regex language, and man:pcre2api(3) for information about the supported flags.
The regex will be compiled using
PCRE2_UTF
and possibly other flags, in addition to the flags supplied in flags.
- classmethod new_for_match_full(pattern, pattern_length, flags, extra_flags)¶
- Parameters:
- Raises:
- Returns:
a newly created
Vte.Regex
, orNone
- error_offset:
return location to store the error offset
- Return type:
Compiles pattern into a regex for use as a match regex with
Vte.Terminal.match_add_regex
() or vte_terminal_event_check_regex_simple().See man:pcre2pattern(3) for information about the supported regex language, and man:pcre2api(3) for information about the supported flags and extra_flags.
The regex will be compiled using
PCRE2_UTF
and possibly other flags, in addition to the flags supplied in flags.If regex compilation fails, error will be set and error_offset point to error as an offset into pattern.
New in version 0.76.
- classmethod new_for_search(pattern, pattern_length, flags)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Compiles pattern into a regex for use as a search regex with
Vte.Terminal.search_set_regex
().See man:pcre2pattern(3) for information about the supported regex language, and man:pcre2api(3) for information about the supported flags.
The regex will be compiled using
PCRE2_UTF
and possibly other flags, in addition to the flags supplied in flags.
- classmethod new_for_search_full(pattern, pattern_length, flags, extra_flags)¶
- Parameters:
- Raises:
- Returns:
a newly created
Vte.Regex
, orNone
- error_offset:
return location to store the error offset
- Return type:
Compiles pattern into a regex for use as a search regex with
Vte.Terminal.search_set_regex
().See man:pcre2pattern(3) for information about the supported regex language, and man:pcre2api(3) for information about the supported flags and extra_flags.
The regex will be compiled using
PCRE2_UTF
and possibly other flags, in addition to the flags supplied in flags.If regex compilation fails, error will be set and error_offset point to error as an offset into pattern.
New in version 0.76.
- jit(flags)¶
- Parameters:
flags (
int
) – PCRE2 JIT flags, or 0- Raises:
- Returns:
True
if JITing succeeded (or PCRE2 was built without JIT support), orFalse
with error filled in- Return type:
If the platform supports JITing, JIT compiles self.