MatchInfo
Object Hierarchy:
GLib.MatchInfo
GLib.MatchInfo
GLib.MatchInfo
Description:
[ Compact ] [ Version ( since = "2.30" ) ] [ CCode ( ref_function = "g_match_info_ref" , type_id = "G_TYPE_MATCH_INFO" , unref_function = "g_match_info_unref" ) ]public class MatchInfo
A GMatchInfo is an opaque struct used to return information about matches.
Content:
Methods:
public string expand_references (string string_to_expand) throws RegexError
Returns a new string containing the text in string_to_expand
with references and escape sequences expanded.
public string ? fetch (int match_num)
Retrieves the text matching the match_num
'th capturing
parentheses.
public string [] fetch_all ()
Bundles up pointers to each of the matching substrings from a match and
stores them in an array of gchar pointers.
public string ? fetch_named (string name)
Retrieves the text matching the capturing parentheses named name
.
public bool fetch_named_pos (string name, out int start_pos, out int end_pos)
Retrieves the position in bytes of the capturing parentheses named
name
.
public bool fetch_pos (int match_num, out int start_pos, out int end_pos)
Retrieves the position in bytes of the match_num
'th capturing
parentheses.
public int get_match_count ()
Retrieves the number of matched substrings (including substring 0, that is
the whole matched text), so 1 is returned if the pattern has no substrings in it and 0 is returned if the match failed.
public unowned Regex get_regex ()
Returns Regex object
used in this .
public unowned string get_string ()
Returns the string searched with this .
public bool is_partial_match ()
Usually if the string passed to g_regex_match*() matches as far as it goes,
but is too short to match the entire pattern, false is returned.
public bool matches ()
Returns whether the previous match operation succeeded.
public bool next () throws RegexError
Scans for the next match using the same parameters of the previous call to
match_full or
match that returned this .