function match_all(string: String, match_options: GLib.RegexMatchFlags): [ok: Boolean, match_info: GLib.MatchInfo] {
    // Gjs wrapper for g_regex_match_all()

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 GLib.Regex.prototype.match_all_full.

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.

Since 2.14


the string to scan for matches


match options


true is the string matched, false otherwise


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