36
37
<th width="100%" align="center">GLib Reference Manual</th>
37
38
<td><a accesskey="n" href="glib-Simple-XML-Subset-Parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
39
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3199765" class="shortcut">Top</a>
41
<a href="#id3201178" class="shortcut">Description</a></nobr></td></tr>
40
<tr><td colspan="5" class="shortcuts">
41
<a href="#glib-Perl-compatible-regular-expressions.synopsis" class="shortcut">Top</a>
43
<a href="#glib-Perl-compatible-regular-expressions.description" class="shortcut">Description</a>
43
46
<div class="refentry" lang="en">
44
47
<a name="glib-Perl-compatible-regular-expressions"></a><div class="titlepage"></div>
45
48
<div class="refnamediv"><table width="100%"><tr>
48
<a name="id3199765"></a><span class="refentrytitle">Perl-compatible regular expressions</span>
50
<p>Perl-compatible regular expressions — matches strings against regular expressions</p>
50
<h2><span class="refentrytitle"><a name="glib-Perl-compatible-regular-expressions.top_of_page"></a>Perl-compatible regular expressions</span></h2>
51
<p>Perl-compatible regular expressions — matches strings against regular expressions</p>
52
53
<td valign="top" align="right"></td>
53
54
</tr></table></div>
54
55
<div class="refsynopsisdiv">
56
<a name="glib-Perl-compatible-regular-expressions.synopsis"></a><h2>Synopsis</h2>
56
57
<pre class="synopsis">
58
59
#include <glib.h>
61
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError">GRegexError</a>;
62
#define <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-ERROR:CAPS">G_REGEX_ERROR</a>
63
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a>;
64
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a>;
65
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>;
66
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback">*GRegexEvalCallback</a>) (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
67
<a class="link" href="glib-Strings.html#GString">GString</a> *result,
68
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
69
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new">g_regex_new</a> (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
70
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
71
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
72
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
73
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref">g_regex_ref</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);
74
void <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref">g_regex_unref</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);
75
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-pattern">g_regex_get_pattern</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);
76
<a class="link" href="glib-Basic-Types.html#gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-max-backref">g_regex_get_max_backref</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);
77
<a class="link" href="glib-Basic-Types.html#gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-capture-count">g_regex_get_capture_count</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);
78
<a class="link" href="glib-Basic-Types.html#gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-string-number">g_regex_get_string_number</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
79
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *name);
80
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-escape-string">g_regex_escape_string</a> (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
81
<a class="link" href="glib-Basic-Types.html#gint">gint</a> length);
82
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-simple">g_regex_match_simple</a> (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
83
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
84
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
85
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options);
86
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match">g_regex_match</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
87
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
88
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
89
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info);
90
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full">g_regex_match_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
91
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
92
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
93
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
94
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
95
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info,
96
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
97
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all">g_regex_match_all</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
98
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
99
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
100
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info);
101
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full">g_regex_match_all_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
102
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
103
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
104
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
105
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
106
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info,
107
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
108
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-simple">g_regex_split_simple</a> (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
109
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
110
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
111
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options);
112
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split">g_regex_split</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
113
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
114
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options);
115
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-full">g_regex_split_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
116
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
117
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
118
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
119
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
120
<a class="link" href="glib-Basic-Types.html#gint">gint</a> max_tokens,
121
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
122
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace">g_regex_replace</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
123
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
124
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
125
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
126
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *replacement,
127
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
128
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
129
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal">g_regex_replace_literal</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
130
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
131
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
132
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
133
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *replacement,
134
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
135
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
136
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval">g_regex_replace_eval</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
137
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
138
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
139
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
140
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
141
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback">GRegexEvalCallback</a> eval,
142
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data,
143
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
144
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement">g_regex_check_replacement</a> (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *replacement,
145
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> *has_references,
146
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
147
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a>;
148
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex">g_match_info_get_regex</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
149
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string">g_match_info_get_string</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
150
void <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free">g_match_info_free</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
151
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-matches">g_match_info_matches</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
152
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next">g_match_info_next</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
153
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
154
<a class="link" href="glib-Basic-Types.html#gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-match-count">g_match_info_get_match_count</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
155
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match">g_match_info_is_partial_match</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
156
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-expand-references">g_match_info_expand_references</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
157
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string_to_expand,
158
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);
159
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch">g_match_info_fetch</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
160
<a class="link" href="glib-Basic-Types.html#gint">gint</a> match_num);
161
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-pos">g_match_info_fetch_pos</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
162
<a class="link" href="glib-Basic-Types.html#gint">gint</a> match_num,
163
<a class="link" href="glib-Basic-Types.html#gint">gint</a> *start_pos,
164
<a class="link" href="glib-Basic-Types.html#gint">gint</a> *end_pos);
165
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named">g_match_info_fetch_named</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
166
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *name);
167
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named-pos">g_match_info_fetch_named_pos</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
168
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *name,
169
<a class="link" href="glib-Basic-Types.html#gint">gint</a> *start_pos,
170
<a class="link" href="glib-Basic-Types.html#gint">gint</a> *end_pos);
171
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-all">g_match_info_fetch_all</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);
61
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError" title="enum GRegexError">GRegexError</a>;
62
#define <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-ERROR--CAPS" title="G_REGEX_ERROR">G_REGEX_ERROR</a>
63
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a>;
64
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a>;
65
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a>;
66
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()">*GRegexEvalCallback</a>) (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
67
<a class="link" href="glib-Strings.html#GString" title="GString">GString</a> *result,
68
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);
69
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()">g_regex_new</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
70
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
71
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
72
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
73
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref" title="g_regex_ref ()">g_regex_ref</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);
74
void <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref" title="g_regex_unref ()">g_regex_unref</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);
75
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-pattern" title="g_regex_get_pattern ()">g_regex_get_pattern</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);
76
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-max-backref" title="g_regex_get_max_backref ()">g_regex_get_max_backref</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);
77
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-capture-count" title="g_regex_get_capture_count ()">g_regex_get_capture_count</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);
78
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-string-number" title="g_regex_get_string_number ()">g_regex_get_string_number</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
79
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name);
80
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-escape-string" title="g_regex_escape_string ()">g_regex_escape_string</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
81
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> length);
82
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-simple" title="g_regex_match_simple ()">g_regex_match_simple</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
83
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
84
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
85
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options);
86
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()">g_regex_match</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
87
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
88
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
89
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info);
90
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full" title="g_regex_match_full ()">g_regex_match_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
91
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
92
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
93
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
94
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
95
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info,
96
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
97
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()">g_regex_match_all</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
98
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
99
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
100
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info);
101
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()">g_regex_match_all_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
102
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
103
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
104
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
105
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
106
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info,
107
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
108
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-simple" title="g_regex_split_simple ()">g_regex_split_simple</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
109
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
110
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
111
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options);
112
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split" title="g_regex_split ()">g_regex_split</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
113
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
114
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options);
115
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-full" title="g_regex_split_full ()">g_regex_split_full</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
116
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
117
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
118
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
119
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
120
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> max_tokens,
121
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
122
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()">g_regex_replace</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
123
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
124
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
125
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
126
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *replacement,
127
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
128
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
129
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()">g_regex_replace_literal</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
130
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
131
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
132
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
133
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *replacement,
134
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
135
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
136
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()">g_regex_replace_eval</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
137
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
138
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
139
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
140
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
141
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()">GRegexEvalCallback</a> eval,
142
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data,
143
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
144
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement" title="g_regex_check_replacement ()">g_regex_check_replacement</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *replacement,
145
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> *has_references,
146
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
147
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a>;
148
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex" title="g_match_info_get_regex ()">g_match_info_get_regex</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
149
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string" title="g_match_info_get_string ()">g_match_info_get_string</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
150
void <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()">g_match_info_free</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
151
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-matches" title="g_match_info_matches ()">g_match_info_matches</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
152
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()">g_match_info_next</a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
153
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
154
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-match-count" title="g_match_info_get_match_count ()">g_match_info_get_match_count</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
155
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match" title="g_match_info_is_partial_match ()">g_match_info_is_partial_match</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
156
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-expand-references" title="g_match_info_expand_references ()">g_match_info_expand_references</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
157
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string_to_expand,
158
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
159
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch" title="g_match_info_fetch ()">g_match_info_fetch</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
160
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> match_num);
161
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-pos" title="g_match_info_fetch_pos ()">g_match_info_fetch_pos</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
162
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> match_num,
163
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *start_pos,
164
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *end_pos);
165
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named" title="g_match_info_fetch_named ()">g_match_info_fetch_named</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
166
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name);
167
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named-pos" title="g_match_info_fetch_named_pos ()">g_match_info_fetch_named_pos</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
168
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name,
169
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *start_pos,
170
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *end_pos);
171
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-all" title="g_match_info_fetch_all ()">g_match_info_fetch_all</a> (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);
175
174
<div class="refsect1" lang="en">
176
<a name="id3201178"></a><h2>Description</h2>
175
<a name="glib-Perl-compatible-regular-expressions.description"></a><h2>Description</h2>
178
177
The <code class="function">g_regex_*()</code> functions implement regular
179
178
expression pattern matching using syntax and semantics similar to
296
294
<col align="left" valign="top">
299
<td><p><span class="term"><a name="G-REGEX-ERROR-COMPILE:CAPS"></a><code class="literal">G_REGEX_ERROR_COMPILE</code></span></p></td>
297
<td><p><a name="G-REGEX-ERROR-COMPILE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_COMPILE</code></span></p></td>
300
298
<td>Compilation of the regular expression failed.
304
<td><p><span class="term"><a name="G-REGEX-ERROR-OPTIMIZE:CAPS"></a><code class="literal">G_REGEX_ERROR_OPTIMIZE</code></span></p></td>
302
<td><p><a name="G-REGEX-ERROR-OPTIMIZE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_OPTIMIZE</code></span></p></td>
305
303
<td>Optimization of the regular expression failed.
309
<td><p><span class="term"><a name="G-REGEX-ERROR-REPLACE:CAPS"></a><code class="literal">G_REGEX_ERROR_REPLACE</code></span></p></td>
307
<td><p><a name="G-REGEX-ERROR-REPLACE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_REPLACE</code></span></p></td>
310
308
<td>Replacement failed due to an ill-formed replacement string.
314
<td><p><span class="term"><a name="G-REGEX-ERROR-MATCH:CAPS"></a><code class="literal">G_REGEX_ERROR_MATCH</code></span></p></td>
312
<td><p><a name="G-REGEX-ERROR-MATCH--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MATCH</code></span></p></td>
315
313
<td>The match process failed.
319
<td><p><span class="term"><a name="G-REGEX-ERROR-INTERNAL:CAPS"></a><code class="literal">G_REGEX_ERROR_INTERNAL</code></span></p></td>
317
<td><p><a name="G-REGEX-ERROR-INTERNAL--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INTERNAL</code></span></p></td>
320
318
<td>Internal error of the regular expression engine. Since 2.16
324
<td><p><span class="term"><a name="G-REGEX-ERROR-STRAY-BACKSLASH:CAPS"></a><code class="literal">G_REGEX_ERROR_STRAY_BACKSLASH</code></span></p></td>
322
<td><p><a name="G-REGEX-ERROR-STRAY-BACKSLASH--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_STRAY_BACKSLASH</code></span></p></td>
325
323
<td>"\\" at end of pattern. Since 2.16
329
<td><p><span class="term"><a name="G-REGEX-ERROR-MISSING-CONTROL-CHAR:CAPS"></a><code class="literal">G_REGEX_ERROR_MISSING_CONTROL_CHAR</code></span></p></td>
327
<td><p><a name="G-REGEX-ERROR-MISSING-CONTROL-CHAR--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_CONTROL_CHAR</code></span></p></td>
330
328
<td>"\\c" at end of pattern. Since 2.16
334
<td><p><span class="term"><a name="G-REGEX-ERROR-UNRECOGNIZED-ESCAPE:CAPS"></a><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_ESCAPE</code></span></p></td>
332
<td><p><a name="G-REGEX-ERROR-UNRECOGNIZED-ESCAPE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_ESCAPE</code></span></p></td>
335
333
<td>Unrecognized character follows "\\". Since 2.16
339
<td><p><span class="term"><a name="G-REGEX-ERROR-QUANTIFIERS-OUT-OF-ORDER:CAPS"></a><code class="literal">G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER</code></span></p></td>
337
<td><p><a name="G-REGEX-ERROR-QUANTIFIERS-OUT-OF-ORDER--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER</code></span></p></td>
340
338
<td>Numbers out of order in "{}" quantifier. Since 2.16
344
<td><p><span class="term"><a name="G-REGEX-ERROR-QUANTIFIER-TOO-BIG:CAPS"></a><code class="literal">G_REGEX_ERROR_QUANTIFIER_TOO_BIG</code></span></p></td>
342
<td><p><a name="G-REGEX-ERROR-QUANTIFIER-TOO-BIG--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_QUANTIFIER_TOO_BIG</code></span></p></td>
345
343
<td>Number too big in "{}" quantifier. Since 2.16
349
<td><p><span class="term"><a name="G-REGEX-ERROR-UNTERMINATED-CHARACTER-CLASS:CAPS"></a><code class="literal">G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS</code></span></p></td>
347
<td><p><a name="G-REGEX-ERROR-UNTERMINATED-CHARACTER-CLASS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS</code></span></p></td>
350
348
<td>Missing terminating "]" for character class. Since 2.16
354
<td><p><span class="term"><a name="G-REGEX-ERROR-INVALID-ESCAPE-IN-CHARACTER-CLASS:CAPS"></a><code class="literal">G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS</code></span></p></td>
352
<td><p><a name="G-REGEX-ERROR-INVALID-ESCAPE-IN-CHARACTER-CLASS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS</code></span></p></td>
355
353
<td>Invalid escape sequence in character class. Since 2.16
359
<td><p><span class="term"><a name="G-REGEX-ERROR-RANGE-OUT-OF-ORDER:CAPS"></a><code class="literal">G_REGEX_ERROR_RANGE_OUT_OF_ORDER</code></span></p></td>
357
<td><p><a name="G-REGEX-ERROR-RANGE-OUT-OF-ORDER--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_RANGE_OUT_OF_ORDER</code></span></p></td>
360
358
<td>Range out of order in character class. Since 2.16
364
<td><p><span class="term"><a name="G-REGEX-ERROR-NOTHING-TO-REPEAT:CAPS"></a><code class="literal">G_REGEX_ERROR_NOTHING_TO_REPEAT</code></span></p></td>
362
<td><p><a name="G-REGEX-ERROR-NOTHING-TO-REPEAT--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_NOTHING_TO_REPEAT</code></span></p></td>
365
363
<td>Nothing to repeat. Since 2.16
369
<td><p><span class="term"><a name="G-REGEX-ERROR-UNRECOGNIZED-CHARACTER:CAPS"></a><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_CHARACTER</code></span></p></td>
367
<td><p><a name="G-REGEX-ERROR-UNRECOGNIZED-CHARACTER--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_CHARACTER</code></span></p></td>
370
368
<td>Unrecognized character after "(?", "(?<" or "(?P". Since 2.16
374
<td><p><span class="term"><a name="G-REGEX-ERROR-POSIX-NAMED-CLASS-OUTSIDE-CLASS:CAPS"></a><code class="literal">G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS</code></span></p></td>
372
<td><p><a name="G-REGEX-ERROR-POSIX-NAMED-CLASS-OUTSIDE-CLASS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS</code></span></p></td>
375
373
<td>POSIX named classes are supported only within a class. Since 2.16
379
<td><p><span class="term"><a name="G-REGEX-ERROR-UNMATCHED-PARENTHESIS:CAPS"></a><code class="literal">G_REGEX_ERROR_UNMATCHED_PARENTHESIS</code></span></p></td>
377
<td><p><a name="G-REGEX-ERROR-UNMATCHED-PARENTHESIS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNMATCHED_PARENTHESIS</code></span></p></td>
380
378
<td>Missing terminating ")" or ")" without opening "(". Since 2.16
384
<td><p><span class="term"><a name="G-REGEX-ERROR-INEXISTENT-SUBPATTERN-REFERENCE:CAPS"></a><code class="literal">G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE</code></span></p></td>
382
<td><p><a name="G-REGEX-ERROR-INEXISTENT-SUBPATTERN-REFERENCE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE</code></span></p></td>
385
383
<td>Reference to non-existent subpattern. Since 2.16
389
<td><p><span class="term"><a name="G-REGEX-ERROR-UNTERMINATED-COMMENT:CAPS"></a><code class="literal">G_REGEX_ERROR_UNTERMINATED_COMMENT</code></span></p></td>
387
<td><p><a name="G-REGEX-ERROR-UNTERMINATED-COMMENT--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNTERMINATED_COMMENT</code></span></p></td>
390
388
<td>Missing terminating ")" after comment. Since 2.16
394
<td><p><span class="term"><a name="G-REGEX-ERROR-EXPRESSION-TOO-LARGE:CAPS"></a><code class="literal">G_REGEX_ERROR_EXPRESSION_TOO_LARGE</code></span></p></td>
392
<td><p><a name="G-REGEX-ERROR-EXPRESSION-TOO-LARGE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_EXPRESSION_TOO_LARGE</code></span></p></td>
395
393
<td>Regular expression too large. Since 2.16
399
<td><p><span class="term"><a name="G-REGEX-ERROR-MEMORY-ERROR:CAPS"></a><code class="literal">G_REGEX_ERROR_MEMORY_ERROR</code></span></p></td>
397
<td><p><a name="G-REGEX-ERROR-MEMORY-ERROR--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MEMORY_ERROR</code></span></p></td>
400
398
<td>Failed to get memory. Since 2.16
404
<td><p><span class="term"><a name="G-REGEX-ERROR-VARIABLE-LENGTH-LOOKBEHIND:CAPS"></a><code class="literal">G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND</code></span></p></td>
402
<td><p><a name="G-REGEX-ERROR-VARIABLE-LENGTH-LOOKBEHIND--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND</code></span></p></td>
405
403
<td>Lookbehind assertion is not fixed length. Since 2.16
409
<td><p><span class="term"><a name="G-REGEX-ERROR-MALFORMED-CONDITION:CAPS"></a><code class="literal">G_REGEX_ERROR_MALFORMED_CONDITION</code></span></p></td>
407
<td><p><a name="G-REGEX-ERROR-MALFORMED-CONDITION--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MALFORMED_CONDITION</code></span></p></td>
410
408
<td>Malformed number or name after "(?(". Since 2.16
414
<td><p><span class="term"><a name="G-REGEX-ERROR-TOO-MANY-CONDITIONAL-BRANCHES:CAPS"></a><code class="literal">G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES</code></span></p></td>
412
<td><p><a name="G-REGEX-ERROR-TOO-MANY-CONDITIONAL-BRANCHES--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES</code></span></p></td>
415
413
<td>Conditional group contains more than two branches. Since 2.16
419
<td><p><span class="term"><a name="G-REGEX-ERROR-ASSERTION-EXPECTED:CAPS"></a><code class="literal">G_REGEX_ERROR_ASSERTION_EXPECTED</code></span></p></td>
417
<td><p><a name="G-REGEX-ERROR-ASSERTION-EXPECTED--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_ASSERTION_EXPECTED</code></span></p></td>
420
418
<td>Assertion expected after "(?(". Since 2.16
424
<td><p><span class="term"><a name="G-REGEX-ERROR-UNKNOWN-POSIX-CLASS-NAME:CAPS"></a><code class="literal">G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME</code></span></p></td>
422
<td><p><a name="G-REGEX-ERROR-UNKNOWN-POSIX-CLASS-NAME--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME</code></span></p></td>
425
423
<td>Unknown POSIX class name. Since 2.16
429
<td><p><span class="term"><a name="G-REGEX-ERROR-POSIX-COLLATING-ELEMENTS-NOT-SUPPORTED:CAPS"></a><code class="literal">G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED</code></span></p></td>
427
<td><p><a name="G-REGEX-ERROR-POSIX-COLLATING-ELEMENTS-NOT-SUPPORTED--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED</code></span></p></td>
430
428
<td>POSIX collating elements are not supported. Since 2.16
434
<td><p><span class="term"><a name="G-REGEX-ERROR-HEX-CODE-TOO-LARGE:CAPS"></a><code class="literal">G_REGEX_ERROR_HEX_CODE_TOO_LARGE</code></span></p></td>
432
<td><p><a name="G-REGEX-ERROR-HEX-CODE-TOO-LARGE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_HEX_CODE_TOO_LARGE</code></span></p></td>
435
433
<td>Character value in "\\x{...}" sequence is too large. Since 2.16
439
<td><p><span class="term"><a name="G-REGEX-ERROR-INVALID-CONDITION:CAPS"></a><code class="literal">G_REGEX_ERROR_INVALID_CONDITION</code></span></p></td>
437
<td><p><a name="G-REGEX-ERROR-INVALID-CONDITION--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_CONDITION</code></span></p></td>
440
438
<td>Invalid condition "(?(0)". Since 2.16
444
<td><p><span class="term"><a name="G-REGEX-ERROR-SINGLE-BYTE-MATCH-IN-LOOKBEHIND:CAPS"></a><code class="literal">G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND</code></span></p></td>
442
<td><p><a name="G-REGEX-ERROR-SINGLE-BYTE-MATCH-IN-LOOKBEHIND--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND</code></span></p></td>
445
443
<td>\\C not allowed in lookbehind assertion. Since 2.16
449
<td><p><span class="term"><a name="G-REGEX-ERROR-INFINITE-LOOP:CAPS"></a><code class="literal">G_REGEX_ERROR_INFINITE_LOOP</code></span></p></td>
447
<td><p><a name="G-REGEX-ERROR-INFINITE-LOOP--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INFINITE_LOOP</code></span></p></td>
450
448
<td>Recursive call could loop indefinitely. Since 2.16
454
<td><p><span class="term"><a name="G-REGEX-ERROR-MISSING-SUBPATTERN-NAME-TERMINATOR:CAPS"></a><code class="literal">G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR</code></span></p></td>
452
<td><p><a name="G-REGEX-ERROR-MISSING-SUBPATTERN-NAME-TERMINATOR--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR</code></span></p></td>
455
453
<td>Missing terminator in subpattern name. Since 2.16
459
<td><p><span class="term"><a name="G-REGEX-ERROR-DUPLICATE-SUBPATTERN-NAME:CAPS"></a><code class="literal">G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME</code></span></p></td>
457
<td><p><a name="G-REGEX-ERROR-DUPLICATE-SUBPATTERN-NAME--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME</code></span></p></td>
460
458
<td>Two named subpatterns have the same name. Since 2.16
464
<td><p><span class="term"><a name="G-REGEX-ERROR-MALFORMED-PROPERTY:CAPS"></a><code class="literal">G_REGEX_ERROR_MALFORMED_PROPERTY</code></span></p></td>
462
<td><p><a name="G-REGEX-ERROR-MALFORMED-PROPERTY--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MALFORMED_PROPERTY</code></span></p></td>
465
463
<td>Malformed "\\P" or "\\p" sequence. Since 2.16
469
<td><p><span class="term"><a name="G-REGEX-ERROR-UNKNOWN-PROPERTY:CAPS"></a><code class="literal">G_REGEX_ERROR_UNKNOWN_PROPERTY</code></span></p></td>
467
<td><p><a name="G-REGEX-ERROR-UNKNOWN-PROPERTY--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNKNOWN_PROPERTY</code></span></p></td>
470
468
<td>Unknown property name after "\\P" or "\\p". Since 2.16
474
<td><p><span class="term"><a name="G-REGEX-ERROR-SUBPATTERN-NAME-TOO-LONG:CAPS"></a><code class="literal">G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG</code></span></p></td>
472
<td><p><a name="G-REGEX-ERROR-SUBPATTERN-NAME-TOO-LONG--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG</code></span></p></td>
475
473
<td>Subpattern name is too long (maximum 32 characters). Since 2.16
479
<td><p><span class="term"><a name="G-REGEX-ERROR-TOO-MANY-SUBPATTERNS:CAPS"></a><code class="literal">G_REGEX_ERROR_TOO_MANY_SUBPATTERNS</code></span></p></td>
477
<td><p><a name="G-REGEX-ERROR-TOO-MANY-SUBPATTERNS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_SUBPATTERNS</code></span></p></td>
480
478
<td>Too many named subpatterns (maximum 10,000). Since 2.16
484
<td><p><span class="term"><a name="G-REGEX-ERROR-INVALID-OCTAL-VALUE:CAPS"></a><code class="literal">G_REGEX_ERROR_INVALID_OCTAL_VALUE</code></span></p></td>
482
<td><p><a name="G-REGEX-ERROR-INVALID-OCTAL-VALUE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_OCTAL_VALUE</code></span></p></td>
485
483
<td>Octal value is greater than "\\377". Since 2.16
489
<td><p><span class="term"><a name="G-REGEX-ERROR-TOO-MANY-BRANCHES-IN-DEFINE:CAPS"></a><code class="literal">G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE</code></span></p></td>
487
<td><p><a name="G-REGEX-ERROR-TOO-MANY-BRANCHES-IN-DEFINE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE</code></span></p></td>
490
488
<td>"DEFINE" group contains more than one branch. Since 2.16
494
<td><p><span class="term"><a name="G-REGEX-ERROR-DEFINE-REPETION:CAPS"></a><code class="literal">G_REGEX_ERROR_DEFINE_REPETION</code></span></p></td>
492
<td><p><a name="G-REGEX-ERROR-DEFINE-REPETION--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_DEFINE_REPETION</code></span></p></td>
495
493
<td>Repeating a "DEFINE" group is not allowed. Since 2.16
499
<td><p><span class="term"><a name="G-REGEX-ERROR-INCONSISTENT-NEWLINE-OPTIONS:CAPS"></a><code class="literal">G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS</code></span></p></td>
497
<td><p><a name="G-REGEX-ERROR-INCONSISTENT-NEWLINE-OPTIONS--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS</code></span></p></td>
500
498
<td>Inconsistent newline options. Since 2.16
504
<td><p><span class="term"><a name="G-REGEX-ERROR-MISSING-BACK-REFERENCE:CAPS"></a><code class="literal">G_REGEX_ERROR_MISSING_BACK_REFERENCE</code></span></p></td>
502
<td><p><a name="G-REGEX-ERROR-MISSING-BACK-REFERENCE--CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_BACK_REFERENCE</code></span></p></td>
505
503
<td>"\\g" is not followed by a braced name or an
506
504
optionally braced non-zero number. Since 2.16
511
<p class="since">Since 2.14
509
<p class="since">Since 2.14</p>
516
512
<div class="refsect2" lang="en">
517
<a name="id3202529"></a><h3>
518
<a name="G-REGEX-ERROR:CAPS"></a>G_REGEX_ERROR</h3>
519
<a class="indexterm" name="id3202544"></a><pre class="programlisting">#define G_REGEX_ERROR g_regex_error_quark ()
513
<a name="G-REGEX-ERROR--CAPS"></a><h3>G_REGEX_ERROR</h3>
514
<pre class="programlisting">#define G_REGEX_ERROR g_regex_error_quark ()
522
Error domain for regular expressions. Errors in this domain will be from the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError"><span class="type">GRegexError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for information on error domains.
524
<p class="since">Since 2.14
517
Error domain for regular expressions. Errors in this domain will be from the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError" title="enum GRegexError"><span class="type">GRegexError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for information on error domains.
519
<p class="since">Since 2.14</p>
530
522
<div class="refsect2" lang="en">
531
<a name="id3202584"></a><h3>
532
<a name="GRegexCompileFlags"></a>enum GRegexCompileFlags</h3>
533
<a class="indexterm" name="id3202600"></a><pre class="programlisting">typedef enum
523
<a name="GRegexCompileFlags"></a><h3>enum GRegexCompileFlags</h3>
524
<pre class="programlisting">typedef enum
535
526
G_REGEX_CASELESS = 1 << 0,
536
527
G_REGEX_MULTILINE = 1 << 1,
733
<td><p><span class="term"><a name="G-REGEX-MATCH-PARTIAL:CAPS"></a><code class="literal">G_REGEX_MATCH_PARTIAL</code></span></p></td>
721
<td><p><a name="G-REGEX-MATCH-PARTIAL--CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_PARTIAL</code></span></p></td>
734
722
<td>Turns on the partial matching feature, for more
735
documentation on partial matching see <code class="function">g_regex_is_partial_match()</code>.
739
<td><p><span class="term"><a name="G-REGEX-MATCH-NEWLINE-CR:CAPS"></a><code class="literal">G_REGEX_MATCH_NEWLINE_CR</code></span></p></td>
740
<td>Overrides the newline definition set when creating
741
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>, setting the '\r' character as line terminator.
745
<td><p><span class="term"><a name="G-REGEX-MATCH-NEWLINE-LF:CAPS"></a><code class="literal">G_REGEX_MATCH_NEWLINE_LF</code></span></p></td>
746
<td>Overrides the newline definition set when creating
747
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>, setting the '\n' character as line terminator.
751
<td><p><span class="term"><a name="G-REGEX-MATCH-NEWLINE-CRLF:CAPS"></a><code class="literal">G_REGEX_MATCH_NEWLINE_CRLF</code></span></p></td>
752
<td>Overrides the newline definition set when creating
753
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>, setting the '\r\n' characters as line terminator.
757
<td><p><span class="term"><a name="G-REGEX-MATCH-NEWLINE-ANY:CAPS"></a><code class="literal">G_REGEX_MATCH_NEWLINE_ANY</code></span></p></td>
758
<td>Overrides the newline definition set when creating
759
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>, any newline character or character sequence is recognized.
723
documentation on partial matching see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match" title="g_match_info_is_partial_match ()"><code class="function">g_match_info_is_partial_match()</code></a>.
727
<td><p><a name="G-REGEX-MATCH-NEWLINE-CR--CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_CR</code></span></p></td>
728
<td>Overrides the newline definition set when creating
729
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\r' character as line terminator.
733
<td><p><a name="G-REGEX-MATCH-NEWLINE-LF--CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_LF</code></span></p></td>
734
<td>Overrides the newline definition set when creating
735
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\n' character as line terminator.
739
<td><p><a name="G-REGEX-MATCH-NEWLINE-CRLF--CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_CRLF</code></span></p></td>
740
<td>Overrides the newline definition set when creating
741
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\r\n' characters as line terminator.
745
<td><p><a name="G-REGEX-MATCH-NEWLINE-ANY--CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_ANY</code></span></p></td>
746
<td>Overrides the newline definition set when creating
747
a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, any newline character or character sequence is recognized.
764
<p class="since">Since 2.14
752
<p class="since">Since 2.14</p>
769
755
<div class="refsect2" lang="en">
770
<a name="id3203353"></a><h3>
771
<a name="GRegex"></a>GRegex</h3>
772
<a class="indexterm" name="id3203367"></a><pre class="programlisting">typedef struct _GRegex GRegex;</pre>
756
<a name="GRegex"></a><h3>GRegex</h3>
757
<pre class="programlisting">typedef struct _GRegex GRegex;</pre>
774
759
A GRegex is the "compiled" form of a regular expression pattern. This
775
760
structure is opaque and its fields cannot be accessed directly.
777
<p class="since">Since 2.14
762
<p class="since">Since 2.14</p>
782
765
<div class="refsect2" lang="en">
783
<a name="id3203391"></a><h3>
784
<a name="GRegexEvalCallback"></a>GRegexEvalCallback ()</h3>
785
<a class="indexterm" name="id3203407"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> (*GRegexEvalCallback) (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
786
<a class="link" href="glib-Strings.html#GString">GString</a> *result,
787
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
766
<a name="GRegexEvalCallback"></a><h3>GRegexEvalCallback ()</h3>
767
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> (*GRegexEvalCallback) (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
768
<a class="link" href="glib-Strings.html#GString" title="GString">GString</a> *result,
769
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data);</pre>
789
Specifies the type of the function passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval"><code class="function">g_regex_replace_eval()</code></a>.
771
Specifies the type of the function passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>.
790
772
It is called for each occurance of the pattern in the string passed
791
to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval"><code class="function">g_regex_replace_eval()</code></a>, and it should append the replacement to
773
to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>, and it should append the replacement to
792
774
<em class="parameter"><code>result</code></em>.
794
776
<div class="variablelist"><table border="0">
795
777
<col align="left" valign="top">
798
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
799
<td>the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> generated by the match.
800
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex"><code class="function">g_match_info_get_regex()</code></a> and <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string"><code class="function">g_match_info_get_string()</code></a> if you
801
need the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> or the matched string.
805
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
806
<td>a <a class="link" href="glib-Strings.html#GString"><span class="type">GString</span></a> containing the new string
810
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
811
<td>user data passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval"><code class="function">g_regex_replace_eval()</code></a>
815
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
817
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to continue the replacement process, <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to stop it
780
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
781
<td>the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> generated by the match.
782
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex" title="g_match_info_get_regex ()"><code class="function">g_match_info_get_regex()</code></a> and <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string" title="g_match_info_get_string ()"><code class="function">g_match_info_get_string()</code></a> if you
783
need the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> or the matched string.
787
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
788
<td>a <a class="link" href="glib-Strings.html#GString" title="GString"><span class="type">GString</span></a> containing the new string
792
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
793
<td>user data passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>
797
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
798
<td>%FALSE to continue the replacement process, <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> to stop it
822
<p class="since">Since 2.14
803
<p class="since">Since 2.14</p>
828
806
<div class="refsect2" lang="en">
829
<a name="id3203622"></a><h3>
830
<a name="g-regex-new"></a>g_regex_new ()</h3>
831
<a class="indexterm" name="id3203636"></a><pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* g_regex_new (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
832
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
833
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
834
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
807
<a name="g-regex-new"></a><h3>g_regex_new ()</h3>
808
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * g_regex_new (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
809
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
810
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
811
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
836
813
Compiles the regular expression to an internal form, and does
837
the initial setup of the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure.</p>
814
the initial setup of the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure.</p>
841
817
<div class="variablelist"><table border="0">
842
818
<col align="left" valign="top">
845
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
821
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
846
822
<td> the regular expression
850
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
826
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
851
827
<td> compile options for the regular expression
855
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
831
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
856
832
<td> match options for the regular expression
860
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
861
<td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
836
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
837
<td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
865
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
866
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure. Call <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref"><code class="function">g_regex_unref()</code></a> when you
841
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
842
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure. Call <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref" title="g_regex_unref ()"><code class="function">g_regex_unref()</code></a> when you
873
<p class="since">Since 2.14
849
<p class="since">Since 2.14</p>
877
852
<div class="refsect2" lang="en">
878
<a name="id3203808"></a><h3>
879
<a name="g-regex-ref"></a>g_regex_ref ()</h3>
880
<a class="indexterm" name="id3203822"></a><pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* g_regex_ref (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);</pre>
853
<a name="g-regex-ref"></a><h3>g_regex_ref ()</h3>
854
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * g_regex_ref (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);</pre>
882
856
Increases reference count of <em class="parameter"><code>regex</code></em> by 1.</p>
886
859
<div class="variablelist"><table border="0">
887
860
<col align="left" valign="top">
890
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
891
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>
863
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
864
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
895
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
868
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
896
869
<td> <em class="parameter"><code>regex</code></em>
902
<p class="since">Since 2.14
875
<p class="since">Since 2.14</p>
906
878
<div class="refsect2" lang="en">
907
<a name="id3203908"></a><h3>
908
<a name="g-regex-unref"></a>g_regex_unref ()</h3>
909
<a class="indexterm" name="id3203924"></a><pre class="programlisting">void g_regex_unref (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);</pre>
879
<a name="g-regex-unref"></a><h3>g_regex_unref ()</h3>
880
<pre class="programlisting">void g_regex_unref (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);</pre>
911
882
Decreases reference count of <em class="parameter"><code>regex</code></em> by 1. When reference count drops
912
883
to zero, it frees all the memory associated with the regex structure.</p>
916
886
<div class="variablelist"><table border="0">
917
887
<col align="left" valign="top">
919
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
920
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>
889
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
890
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
924
<p class="since">Since 2.14
894
<p class="since">Since 2.14</p>
928
897
<div class="refsect2" lang="en">
929
<a name="id3203996"></a><h3>
930
<a name="g-regex-get-pattern"></a>g_regex_get_pattern ()</h3>
931
<a class="indexterm" name="id3204012"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_regex_get_pattern (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);</pre>
898
<a name="g-regex-get-pattern"></a><h3>g_regex_get_pattern ()</h3>
899
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_regex_get_pattern (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);</pre>
933
901
Gets the pattern string associated with <em class="parameter"><code>regex</code></em>, i.e. a copy of
934
the string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>.</p>
902
the string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>.</p>
938
905
<div class="variablelist"><table border="0">
939
906
<col align="left" valign="top">
942
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
943
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure
909
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
910
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
947
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
914
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
948
915
<td> the pattern of <em class="parameter"><code>regex</code></em>
954
<p class="since">Since 2.14
921
<p class="since">Since 2.14</p>
958
924
<div class="refsect2" lang="en">
959
<a name="id3204111"></a><h3>
960
<a name="g-regex-get-max-backref"></a>g_regex_get_max_backref ()</h3>
961
<a class="indexterm" name="id3204126"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_regex_get_max_backref (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);</pre>
925
<a name="g-regex-get-max-backref"></a><h3>g_regex_get_max_backref ()</h3>
926
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> g_regex_get_max_backref (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);</pre>
963
928
Returns the number of the highest back reference
964
929
in the pattern, or 0 if the pattern does not contain
965
930
back references.</p>
969
933
<div class="variablelist"><table border="0">
970
934
<col align="left" valign="top">
973
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
974
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>
937
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
938
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
978
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
942
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
979
943
<td> the number of the highest back reference
985
<p class="since">Since 2.14
949
<p class="since">Since 2.14</p>
989
952
<div class="refsect2" lang="en">
990
<a name="id3204204"></a><h3>
991
<a name="g-regex-get-capture-count"></a>g_regex_get_capture_count ()</h3>
992
<a class="indexterm" name="id3204220"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_regex_get_capture_count (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex);</pre>
953
<a name="g-regex-get-capture-count"></a><h3>g_regex_get_capture_count ()</h3>
954
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> g_regex_get_capture_count (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex);</pre>
994
956
Returns the number of capturing subpatterns in the pattern.</p>
998
959
<div class="variablelist"><table border="0">
999
960
<col align="left" valign="top">
1002
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1003
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>
963
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
964
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
1007
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
968
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1008
969
<td> the number of capturing subpatterns
1014
<p class="since">Since 2.14
975
<p class="since">Since 2.14</p>
1018
978
<div class="refsect2" lang="en">
1019
<a name="id3204295"></a><h3>
1020
<a name="g-regex-get-string-number"></a>g_regex_get_string_number ()</h3>
1021
<a class="indexterm" name="id3204311"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_regex_get_string_number (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1022
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *name);</pre>
979
<a name="g-regex-get-string-number"></a><h3>g_regex_get_string_number ()</h3>
980
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> g_regex_get_string_number (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
981
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name);</pre>
1024
983
Retrieves the number of the subexpression named <em class="parameter"><code>name</code></em>.</p>
1028
986
<div class="variablelist"><table border="0">
1029
987
<col align="left" valign="top">
1032
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1033
<td> <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure
990
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
991
<td> <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
1037
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
995
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1038
996
<td> name of the subexpression
1042
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1000
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1043
1001
<td> The number of the subexpression or -1 if <em class="parameter"><code>name</code></em>
1044
1002
does not exists
1066
1022
in this case remember to specify the correct length of <em class="parameter"><code>string</code></em>
1067
1023
in <em class="parameter"><code>length</code></em>.</p>
1071
1026
<div class="variablelist"><table border="0">
1072
1027
<col align="left" valign="top">
1075
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1030
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1076
1031
<td> the string to escape
1080
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1035
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1081
1036
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1085
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1040
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1086
1041
<td> a newly-allocated escaped string
1092
<p class="since">Since 2.14
1047
<p class="since">Since 2.14</p>
1096
1050
<div class="refsect2" lang="en">
1097
<a name="id3204569"></a><h3>
1098
<a name="g-regex-match-simple"></a>g_regex_match_simple ()</h3>
1099
<a class="indexterm" name="id3204584"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_match_simple (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
1100
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1101
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
1102
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options);</pre>
1051
<a name="g-regex-match-simple"></a><h3>g_regex_match_simple ()</h3>
1052
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_match_simple (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
1053
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1054
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
1055
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options);</pre>
1104
1057
Scans for a match in <em class="parameter"><code>string</code></em> for <em class="parameter"><code>pattern</code></em>.
1107
This function is equivalent to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match"><code class="function">g_regex_match()</code></a> but it does not
1108
require to compile the pattern with <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>, avoiding some
1060
This function is equivalent to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> but it does not
1061
require to compile the pattern with <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>, avoiding some
1109
1062
lines of code when you need just to do a match without extracting
1110
1063
substrings, capture counts, and so on.
1113
1066
If this function is to be called on the same <em class="parameter"><code>pattern</code></em> more than
1114
1067
once, it's more efficient to compile the pattern once with
1115
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a> and then use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match"><code class="function">g_regex_match()</code></a>.</p>
1068
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a> and then use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a>.</p>
1119
1071
<div class="variablelist"><table border="0">
1120
1072
<col align="left" valign="top">
1123
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
1075
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
1124
1076
<td> the regular expression
1128
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1080
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1129
1081
<td> the string to scan for matches
1133
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
1085
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
1134
1086
<td> compile options for the regular expression
1138
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1090
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1139
1091
<td> match options
1143
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1144
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
1095
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1096
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
1150
<p class="since">Since 2.14
1102
<p class="since">Since 2.14</p>
1154
1105
<div class="refsect2" lang="en">
1155
<a name="id3204812"></a><h3>
1156
<a name="g-regex-match"></a>g_regex_match ()</h3>
1157
<a class="indexterm" name="id3204827"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_match (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1158
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1159
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1160
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info);</pre>
1106
<a name="g-regex-match"></a><h3>g_regex_match ()</h3>
1107
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_match (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1108
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1109
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1110
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info);</pre>
1162
1112
Scans for a match in string for the pattern in <em class="parameter"><code>regex</code></em>.
1163
1113
The <em class="parameter"><code>match_options</code></em> are combined with the match options specified
1164
1114
when the <em class="parameter"><code>regex</code></em> structure was created, letting you have more
1165
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structures.
1115
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structures.
1168
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match,
1169
is stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em>
1170
is not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
1118
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match,
1119
is stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em>
1120
is not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
1171
1121
i.e. you must free it regardless if regular expression actually matched.
1174
1124
To retrieve all the non-overlapping matches of the pattern in
1175
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next"><code class="function">g_match_info_next()</code></a>.
1125
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()"><code class="function">g_match_info_next()</code></a>.
1203
1152
<div class="variablelist"><table border="0">
1204
1153
<col align="left" valign="top">
1207
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1208
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>
1156
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1157
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
1212
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1161
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1213
1162
<td> the string to scan for matches
1217
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1166
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1218
1167
<td> match options
1222
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1223
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>,
1224
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you do not need it
1171
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1172
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>,
1173
or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it
1228
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1229
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
1177
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1178
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
1235
<p class="since">Since 2.14
1184
<p class="since">Since 2.14</p>
1239
1187
<div class="refsect2" lang="en">
1240
<a name="id3205154"></a><h3>
1241
<a name="g-regex-match-full"></a>g_regex_match_full ()</h3>
1242
<a class="indexterm" name="id3205170"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_match_full (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1243
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1244
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
1245
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
1246
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1247
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info,
1248
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1188
<a name="g-regex-match-full"></a><h3>g_regex_match_full ()</h3>
1189
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_match_full (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1190
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1191
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
1192
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
1193
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1194
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info,
1195
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1250
1197
Scans for a match in string for the pattern in <em class="parameter"><code>regex</code></em>.
1251
1198
The <em class="parameter"><code>match_options</code></em> are combined with the match options specified
1252
1199
when the <em class="parameter"><code>regex</code></em> structure was created, letting you have more
1253
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structures.
1200
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structures.
1256
1203
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
1257
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1204
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL--CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1258
1205
that begins with any kind of lookbehind assertion, such as "\b".
1261
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1262
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1263
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
1208
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1209
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1210
not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
1264
1211
i.e. you must free it regardless if regular expression actually
1268
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
1269
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free"><code class="function">g_match_info_free()</code></a>) after
1215
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
1216
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()"><code class="function">g_match_info_free()</code></a>) after
1270
1217
freeing or modifying <em class="parameter"><code>string</code></em> then the behaviour is undefined.
1273
1220
To retrieve all the non-overlapping matches of the pattern in
1274
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next"><code class="function">g_match_info_next()</code></a>.
1221
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()"><code class="function">g_match_info_next()</code></a>.
1308
1254
<div class="variablelist"><table border="0">
1309
1255
<col align="left" valign="top">
1312
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1313
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>
1258
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1259
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
1317
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1263
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1318
1264
<td> the string to scan for matches
1322
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1268
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1323
1269
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1327
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1273
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1328
1274
<td> starting index of the string to match
1332
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1278
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1333
1279
<td> match options
1337
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1338
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>,
1339
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you do not need it
1343
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1344
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
1348
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1349
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
1283
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1284
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>,
1285
or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it
1289
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1290
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
1294
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1295
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
1355
<p class="since">Since 2.14
1301
<p class="since">Since 2.14</p>
1359
1304
<div class="refsect2" lang="en">
1360
<a name="id3205648"></a><h3>
1361
<a name="g-regex-match-all"></a>g_regex_match_all ()</h3>
1362
<a class="indexterm" name="id3205663"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_match_all (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1363
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1364
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1365
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info);</pre>
1305
<a name="g-regex-match-all"></a><h3>g_regex_match_all ()</h3>
1306
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_match_all (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1307
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1308
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1309
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info);</pre>
1367
1311
Using the standard algorithm for regular expression matching only
1368
1312
the longest match in the string is retrieved. This function uses
1369
1313
a different algorithm so it can retrieve all the possible matches.
1370
For more documentation see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full"><code class="function">g_regex_match_all_full()</code></a>.
1314
For more documentation see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>.
1373
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1374
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1375
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
1317
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1318
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1319
not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
1376
1320
i.e. you must free it regardless if regular expression actually
1381
1324
<div class="variablelist"><table border="0">
1382
1325
<col align="left" valign="top">
1385
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1386
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>
1328
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1329
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
1390
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1333
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1391
1334
<td> the string to scan for matches
1395
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1338
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1396
1339
<td> match options
1400
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1401
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>,
1402
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you do not need it
1343
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1344
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>,
1345
or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it
1406
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1407
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
1349
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1350
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
1413
<p class="since">Since 2.14
1356
<p class="since">Since 2.14</p>
1417
1359
<div class="refsect2" lang="en">
1418
<a name="id3205924"></a><h3>
1419
<a name="g-regex-match-all-full"></a>g_regex_match_all_full ()</h3>
1420
<a class="indexterm" name="id3205940"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_match_all_full (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1421
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1422
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
1423
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
1424
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1425
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> **match_info,
1426
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1360
<a name="g-regex-match-all-full"></a><h3>g_regex_match_all_full ()</h3>
1361
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_match_all_full (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1362
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1363
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
1364
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
1365
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1366
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> **match_info,
1367
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1428
1369
Using the standard algorithm for regular expression matching only
1429
1370
the longest match in the string is retrieved, it is not possibile
1455
1396
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
1456
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1397
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL--CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1457
1398
that begins with any kind of lookbehind assertion, such as "\b".
1460
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1461
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1462
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
1401
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
1402
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
1403
not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
1463
1404
i.e. you must free it regardless if regular expression actually
1468
1408
<div class="variablelist"><table border="0">
1469
1409
<col align="left" valign="top">
1472
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1473
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>
1412
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1413
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
1477
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1417
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1478
1418
<td> the string to scan for matches
1482
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1422
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1483
1423
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1487
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1427
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1488
1428
<td> starting index of the string to match
1492
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1432
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1493
1433
<td> match options
1497
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1498
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>,
1499
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you do not need it
1503
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1504
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
1508
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1509
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
1437
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
1438
<td> pointer to location where to store the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>,
1439
or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it
1443
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1444
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
1448
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1449
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
1515
<p class="since">Since 2.14
1455
<p class="since">Since 2.14</p>
1519
1458
<div class="refsect2" lang="en">
1520
<a name="id3206360"></a><h3>
1521
<a name="g-regex-split-simple"></a>g_regex_split_simple ()</h3>
1522
<a class="indexterm" name="id3206376"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** g_regex_split_simple (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *pattern,
1523
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1524
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
1525
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options);</pre>
1459
<a name="g-regex-split-simple"></a><h3>g_regex_split_simple ()</h3>
1460
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ** g_regex_split_simple (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *pattern,
1461
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1462
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a> compile_options,
1463
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options);</pre>
1527
1465
Breaks the string on the pattern, and returns an array of
1528
1466
the tokens. If the pattern contains capturing parentheses,
1794
If you do not need to use backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal"><code class="function">g_regex_replace_literal()</code></a>.
1723
If you do not need to use backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()"><code class="function">g_regex_replace_literal()</code></a>.
1797
The <em class="parameter"><code>replacement</code></em> string must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> was
1798
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>. If you want to use not UTF-8 encoded stings
1799
you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal"><code class="function">g_regex_replace_literal()</code></a>.
1726
The <em class="parameter"><code>replacement</code></em> string must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW--CAPS"><span class="type">G_REGEX_RAW</span></a> was
1727
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>. If you want to use not UTF-8 encoded stings
1728
you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()"><code class="function">g_regex_replace_literal()</code></a>.
1802
1731
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
1803
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern that
1732
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL--CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern that
1804
1733
begins with any kind of lookbehind assertion, such as "\b".</p>
1808
1736
<div class="variablelist"><table border="0">
1809
1737
<col align="left" valign="top">
1812
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1813
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure
1740
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1741
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
1817
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1745
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1818
1746
<td> the string to perform matches against
1822
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1750
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1823
1751
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1827
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1755
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1828
1756
<td> starting index of the string to match
1832
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
1760
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
1833
1761
<td> text to replace each match with
1837
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1765
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1838
1766
<td> options for the match
1842
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1843
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
1770
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1771
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
1847
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1775
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1848
1776
<td> a newly allocated string containing the replacements
1854
<p class="since">Since 2.14
1782
<p class="since">Since 2.14</p>
1858
1785
<div class="refsect2" lang="en">
1859
<a name="id3207665"></a><h3>
1860
<a name="g-regex-replace-literal"></a>g_regex_replace_literal ()</h3>
1861
<a class="indexterm" name="id3207680"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_regex_replace_literal (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1862
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1863
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
1864
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
1865
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *replacement,
1866
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1867
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1786
<a name="g-regex-replace-literal"></a><h3>g_regex_replace_literal ()</h3>
1787
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_regex_replace_literal (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1788
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1789
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
1790
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
1791
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *replacement,
1792
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1793
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1869
1795
Replaces all occurances of the pattern in <em class="parameter"><code>regex</code></em> with the
1870
1796
replacement text. <em class="parameter"><code>replacement</code></em> is replaced literally, to
1871
include backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace"><code class="function">g_regex_replace()</code></a>.
1797
include backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>.
1874
1800
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a
1875
shortened string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the
1801
shortened string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL--CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the
1876
1802
case of a pattern that begins with any kind of lookbehind
1877
1803
assertion, such as "\b".</p>
1881
1806
<div class="variablelist"><table border="0">
1882
1807
<col align="left" valign="top">
1885
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1886
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure
1810
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1811
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
1890
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1815
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1891
1816
<td> the string to perform matches against
1895
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1820
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1896
1821
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1900
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1825
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1901
1826
<td> starting index of the string to match
1905
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
1830
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
1906
1831
<td> text to replace each match with
1910
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1835
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1911
1836
<td> options for the match
1915
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1916
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
1840
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1841
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
1920
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1845
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1921
1846
<td> a newly allocated string containing the replacements
1927
<p class="since">Since 2.14
1852
<p class="since">Since 2.14</p>
1931
1855
<div class="refsect2" lang="en">
1932
<a name="id3207957"></a><h3>
1933
<a name="g-regex-replace-eval"></a>g_regex_replace_eval ()</h3>
1934
<a class="indexterm" name="id3207972"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_regex_replace_eval (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a> *regex,
1935
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
1936
<a class="link" href="glib-Basic-Types.html#gssize">gssize</a> string_len,
1937
<a class="link" href="glib-Basic-Types.html#gint">gint</a> start_position,
1938
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1939
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback">GRegexEvalCallback</a> eval,
1940
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data,
1941
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1856
<a name="g-regex-replace-eval"></a><h3>g_regex_replace_eval ()</h3>
1857
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_regex_replace_eval (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> *regex,
1858
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string,
1859
<a class="link" href="glib-Basic-Types.html#gssize" title="gssize">gssize</a> string_len,
1860
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> start_position,
1861
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a> match_options,
1862
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()">GRegexEvalCallback</a> eval,
1863
<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data,
1864
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1943
1866
Replaces occurances of the pattern in regex with the output of
1944
1867
<em class="parameter"><code>eval</code></em> for that occurance.
1947
1870
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
1948
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1871
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL--CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
1949
1872
that begins with any kind of lookbehind assertion, such as "\b".</p>
1953
1875
<div class="variablelist"><table border="0">
1954
1876
<col align="left" valign="top">
1957
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1958
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>
1879
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
1880
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
1962
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1884
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1963
1885
<td> string to perform matches against
1967
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1889
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
1968
1890
<td> the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
1972
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1894
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
1973
1895
<td> starting index of the string to match
1977
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1899
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
1978
1900
<td> options for the match
1982
<td><p><span class="term"><em class="parameter"><code>eval</code></em> :</span></p></td>
1904
<td><p><span class="term"><em class="parameter"><code>eval</code></em> :</span></p></td>
1983
1905
<td> a function to call for each match
1987
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1909
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1988
1910
<td> user data to pass to the function
1992
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1993
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
1914
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1915
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
1997
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1919
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1998
1920
<td> a newly allocated string containing the replacements
2004
<p class="since">Since 2.14
1926
<p class="since">Since 2.14</p>
2008
1929
<div class="refsect2" lang="en">
2009
<a name="id3208265"></a><h3>
2010
<a name="g-regex-check-replacement"></a>g_regex_check_replacement ()</h3>
2011
<a class="indexterm" name="id3208281"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_regex_check_replacement (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *replacement,
2012
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> *has_references,
2013
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1930
<a name="g-regex-check-replacement"></a><h3>g_regex_check_replacement ()</h3>
1931
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_regex_check_replacement (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *replacement,
1932
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> *has_references,
1933
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
2015
1935
Checks whether <em class="parameter"><code>replacement</code></em> is a valid replacement string
2016
(see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace"><code class="function">g_regex_replace()</code></a>), i.e. that all escape sequences in
1936
(see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>), i.e. that all escape sequences in
2020
If <em class="parameter"><code>has_references</code></em> is not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>replacement</code></em> is checked
1940
If <em class="parameter"><code>has_references</code></em> is not <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> then <em class="parameter"><code>replacement</code></em> is checked
2021
1941
for pattern references. For instance, replacement text 'foo\n'
2022
1942
does not contain references and may be evaluated without information
2023
1943
about actual match, but '\0\1' (whole match followed by first
2024
subpattern) requires valid <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> object.</p>
1944
subpattern) requires valid <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> object.</p>
2028
1947
<div class="variablelist"><table border="0">
2029
1948
<col align="left" valign="top">
2032
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
1951
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
2033
1952
<td> the replacement string
2037
<td><p><span class="term"><em class="parameter"><code>has_references</code></em> :</span></p></td>
1956
<td><p><span class="term"><em class="parameter"><code>has_references</code></em> :</span></p></td>
2038
1957
<td> location to store information about
2039
references in <em class="parameter"><code>replacement</code></em> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1958
references in <em class="parameter"><code>replacement</code></em> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
2043
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1962
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2044
1963
<td> location to store error
2048
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1967
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2049
1968
<td> whether <em class="parameter"><code>replacement</code></em> is a valid replacement string
2055
<p class="since">Since 2.14
1974
<p class="since">Since 2.14</p>
2059
1977
<div class="refsect2" lang="en">
2060
<a name="id3208471"></a><h3>
2061
<a name="GMatchInfo"></a>GMatchInfo</h3>
2062
<a class="indexterm" name="id3208486"></a><pre class="programlisting">typedef struct _GMatchInfo GMatchInfo;</pre>
1978
<a name="GMatchInfo"></a><h3>GMatchInfo</h3>
1979
<pre class="programlisting">typedef struct _GMatchInfo GMatchInfo;</pre>
2064
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> is used to retrieve information about the regular expression match
1981
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> is used to retrieve information about the regular expression match
2065
1982
which created it.
2066
1983
This structure is opaque and its fields cannot be accessed directly.
2068
<p class="since">Since 2.14
1985
<p class="since">Since 2.14</p>
2073
1988
<div class="refsect2" lang="en">
2074
<a name="id3208519"></a><h3>
2075
<a name="g-match-info-get-regex"></a>g_match_info_get_regex ()</h3>
2076
<a class="indexterm" name="id3208534"></a><pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>* g_match_info_get_regex (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);</pre>
1989
<a name="g-match-info-get-regex"></a><h3>g_match_info_get_regex ()</h3>
1990
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a> * g_match_info_get_regex (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);</pre>
2078
Returns <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>. It belongs to Glib
2079
and must not be freed. Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref"><code class="function">g_regex_ref()</code></a> if you need to keep it
1992
Returns <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>. It belongs to Glib
1993
and must not be freed. Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref" title="g_regex_ref ()"><code class="function">g_regex_ref()</code></a> if you need to keep it
2080
1994
after you free <em class="parameter"><code>match_info</code></em> object.</p>
2084
1997
<div class="variablelist"><table border="0">
2085
1998
<col align="left" valign="top">
2088
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2089
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>
2001
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2002
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
2093
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2094
<td> <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>
2006
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2007
<td> <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>
2100
<p class="since">Since 2.14
2013
<p class="since">Since 2.14</p>
2104
2016
<div class="refsect2" lang="en">
2105
<a name="id3208655"></a><h3>
2106
<a name="g-match-info-get-string"></a>g_match_info_get_string ()</h3>
2107
<a class="indexterm" name="id3208670"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_match_info_get_string (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);</pre>
2017
<a name="g-match-info-get-string"></a><h3>g_match_info_get_string ()</h3>
2018
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_match_info_get_string (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);</pre>
2109
2020
Returns the string searched with <em class="parameter"><code>match_info</code></em>. This is the
2110
string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match"><code class="function">g_regex_match()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace"><code class="function">g_regex_replace()</code></a> so
2021
string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a> so
2111
2022
you may not free it before calling this function.</p>
2115
2025
<div class="variablelist"><table border="0">
2116
2026
<col align="left" valign="top">
2119
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2120
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>
2029
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2030
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
2124
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2034
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2125
2035
<td> the string searched with <em class="parameter"><code>match_info</code></em>
2131
<p class="since">Since 2.14
2041
<p class="since">Since 2.14</p>
2135
2044
<div class="refsect2" lang="en">
2136
<a name="id3208781"></a><h3>
2137
<a name="g-match-info-free"></a>g_match_info_free ()</h3>
2138
<a class="indexterm" name="id3208796"></a><pre class="programlisting">void g_match_info_free (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);</pre>
2140
Frees all the memory associated with the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure.</p>
2045
<a name="g-match-info-free"></a><h3>g_match_info_free ()</h3>
2046
<pre class="programlisting">void g_match_info_free (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);</pre>
2048
Frees all the memory associated with the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure.</p>
2144
2051
<div class="variablelist"><table border="0">
2145
2052
<col align="left" valign="top">
2147
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2148
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a>
2054
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2055
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
2152
<p class="since">Since 2.14
2059
<p class="since">Since 2.14</p>
2156
2062
<div class="refsect2" lang="en">
2157
<a name="id3208869"></a><h3>
2158
<a name="g-match-info-matches"></a>g_match_info_matches ()</h3>
2159
<a class="indexterm" name="id3208884"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_match_info_matches (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);</pre>
2063
<a name="g-match-info-matches"></a><h3>g_match_info_matches ()</h3>
2064
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_match_info_matches (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);</pre>
2161
2066
Returns whether the previous match operation succeeded.</p>
2165
2069
<div class="variablelist"><table border="0">
2166
2070
<col align="left" valign="top">
2169
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2170
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2073
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2074
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2174
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2175
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the previous match operation succeeded,
2176
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
2078
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2079
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the previous match operation succeeded,
2080
<a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
2182
<p class="since">Since 2.14
2086
<p class="since">Since 2.14</p>
2186
2089
<div class="refsect2" lang="en">
2187
<a name="id3208982"></a><h3>
2188
<a name="g-match-info-next"></a>g_match_info_next ()</h3>
2189
<a class="indexterm" name="id3208997"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> g_match_info_next (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
2190
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
2090
<a name="g-match-info-next"></a><h3>g_match_info_next ()</h3>
2091
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> g_match_info_next (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
2092
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
2192
2094
Scans for the next match using the same parameters of the previous
2193
call to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full"><code class="function">g_regex_match_full()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match"><code class="function">g_regex_match()</code></a> that returned
2095
call to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full" title="g_regex_match_full ()"><code class="function">g_regex_match_full()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> that returned
2194
2096
<em class="parameter"><code>match_info</code></em>.
2197
2099
The match is done on the string passed to the match function, so you
2198
2100
cannot free it before calling this function.</p>
2202
2103
<div class="variablelist"><table border="0">
2203
2104
<col align="left" valign="top">
2206
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2207
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2211
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2212
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
2216
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2217
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
2107
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2108
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2112
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2113
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
2117
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2118
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
2223
<p class="since">Since 2.14
2124
<p class="since">Since 2.14</p>
2227
2127
<div class="refsect2" lang="en">
2228
<a name="id3209159"></a><h3>
2229
<a name="g-match-info-get-match-count"></a>g_match_info_get_match_count ()</h3>
2230
<a class="indexterm" name="id3209174"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_match_info_get_match_count (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info);</pre>
2128
<a name="g-match-info-get-match-count"></a><h3>g_match_info_get_match_count ()</h3>
2129
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> g_match_info_get_match_count (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info);</pre>
2232
2131
Retrieves the number of matched substrings (including substring 0,
2233
2132
that is the whole matched text), so 1 is returned if the pattern
2299
2195
of occurrences is greater than one. Optional items such as "\d?"
2300
2196
(where the maximum is one) are permitted. Quantifiers with any values
2301
2197
are permitted after parentheses, so the invalid examples above can be
2302
coded thus "(a){2,4}" and "(\d)+". If <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-PARTIAL:CAPS"><span class="type">G_REGEX_MATCH_PARTIAL</span></a> is set
2198
coded thus "(a){2,4}" and "(\d)+". If <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-PARTIAL--CAPS"><span class="type">G_REGEX_MATCH_PARTIAL</span></a> is set
2303
2199
for a pattern that does not conform to the restrictions, matching
2304
2200
functions return an error.</p>
2308
2203
<div class="variablelist"><table border="0">
2309
2204
<col align="left" valign="top">
2312
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2313
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2207
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2208
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
2317
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2318
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the match was partial, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
2212
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2213
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the match was partial, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
2324
<p class="since">Since 2.14
2219
<p class="since">Since 2.14</p>
2328
2222
<div class="refsect2" lang="en">
2329
<a name="id3209534"></a><h3>
2330
<a name="g-match-info-expand-references"></a>g_match_info_expand_references ()</h3>
2331
<a class="indexterm" name="id3209549"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_match_info_expand_references (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
2332
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string_to_expand,
2333
<a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
2223
<a name="g-match-info-expand-references"></a><h3>g_match_info_expand_references ()</h3>
2224
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_match_info_expand_references (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
2225
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *string_to_expand,
2226
<a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
2335
2228
Returns a new string containing the text in <em class="parameter"><code>string_to_expand</code></em> with
2336
2229
references and escape sequences expanded. References refer to the last
2337
2230
match done with <em class="parameter"><code>string</code></em> against <em class="parameter"><code>regex</code></em> and have the same syntax used by
2338
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace"><code class="function">g_regex_replace()</code></a>.
2231
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>.
2341
The <em class="parameter"><code>string_to_expand</code></em> must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> was
2342
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new"><code class="function">g_regex_new()</code></a>.
2234
The <em class="parameter"><code>string_to_expand</code></em> must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW--CAPS"><span class="type">G_REGEX_RAW</span></a> was
2235
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>.
2345
2238
The backreferences are extracted from the string passed to the match
2346
2239
function, so you cannot call this function after freeing the string.
2349
<em class="parameter"><code>match_info</code></em> may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in which case <em class="parameter"><code>string_to_expand</code></em> must not
2242
<em class="parameter"><code>match_info</code></em> may be <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> in which case <em class="parameter"><code>string_to_expand</code></em> must not
2350
2243
contain references. For instance "foo\n" does not refer to an actual
2351
2244
pattern and '\n' merely will be replaced with \n character,
2352
2245
while to expand "\0" (whole match) one needs the result of a match.
2353
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement"><code class="function">g_regex_check_replacement()</code></a> to find out whether <em class="parameter"><code>string_to_expand</code></em>
2246
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement" title="g_regex_check_replacement ()"><code class="function">g_regex_check_replacement()</code></a> to find out whether <em class="parameter"><code>string_to_expand</code></em>
2354
2247
contains references.</p>
2358
2250
<div class="variablelist"><table border="0">
2359
2251
<col align="left" valign="top">
2362
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2363
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo"><span class="type">GMatchInfo</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2254
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
2255
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
2367
<td><p><span class="term"><em class="parameter"><code>string_to_expand</code></em> :</span></p></td>
2259
<td><p><span class="term"><em class="parameter"><code>string_to_expand</code></em> :</span></p></td>
2368
2260
<td> the string to expand
2372
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2373
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors
2264
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
2265
<td> location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
2377
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2378
<td> the expanded string, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error occurred
2269
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2270
<td> the expanded string, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if an error occurred
2384
<p class="since">Since 2.14
2276
<p class="since">Since 2.14</p>
2388
2279
<div class="refsect2" lang="en">
2389
<a name="id3209813"></a><h3>
2390
<a name="g-match-info-fetch"></a>g_match_info_fetch ()</h3>
2391
<a class="indexterm" name="id3209828"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_match_info_fetch (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo">GMatchInfo</a> *match_info,
2392
<a class="link" href="glib-Basic-Types.html#gint">gint</a> match_num);</pre>
2280
<a name="g-match-info-fetch"></a><h3>g_match_info_fetch ()</h3>
2281
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> * g_match_info_fetch (const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a> *match_info,
2282
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> match_num);</pre>
2394
2284
Retrieves the text matching the <em class="parameter"><code>match_num</code></em>'th capturing
2395
2285
parentheses. 0 is the full text of the match, 1 is the first paren