Method

VteTerminalevent_check_regex_simple

Declaration [src]

gboolean
vte_terminal_event_check_regex_simple (
  VteTerminal* terminal,
  GdkEvent* event,
  VteRegex** regexes,
  gsize n_regexes,
  guint32 match_flags,
  char** matches
)

Description [src]

Checks each regex in regexes if the text in and around the position of the event matches the regular expressions. If a match exists, the matched text is stored in matches at the position of the regex in regexes; otherwise NULL is stored there. Each non-NULL element of matches should be freed with g_free().

Note that the regexes in regexes should have been created using the PCRE2_MULTILINE flag.

Available since:0.46

Parameters

event GdkEvent*
 

A GdkEvent.

 The data is owned by the caller of the function.
regexes An array of VteRegex
 

An array of VteRegex.

 The length of the array is specified in the n_regexes argument.
 The data is owned by the caller of the function.
n_regexes gsize
 

Number of items in regexes.

 The argument will be set by the function.
match_flags guint32
 

PCRE2 match flags, or 0

matches An array of char*
 

A location to store the matches.

 The argument will be set by the function.
 The length of the array is specified in the n_regexes argument.
 The instance takes ownership of the data, and is responsible for freeing it.

Return value

Returns: gboolean
 

TRUE iff any of the regexes produced a match.