Using the standard algorithm for regular expression matching only the longest match in the string is retrieved. This function uses a different algorithm so it can retrieve all the possible matches. For more documentation see Regex.matchAllFull.

A glib.MatchInfo structure, used to get information on the match, is stored in match_info if not NULL. Note that if match_info is not NULL then it is created even if the function returns FALSE, i.e. you must free it regardless if regular expression actually matched.

string is not copied and is used in glib.MatchInfo internally. If you use any glib.MatchInfo method (except after freeing or modifying string then the behaviour is undefined.

class Regex


string_ string

the string to scan for matches

matchOptions GRegexMatchFlags

match options

matchInfo MatchInfo

pointer to location where to store the glib.MatchInfo, or NULL if you do not need it

Return Value

Type: bool

TRUE is the string matched, FALSE otherwise