@@ -125,20 +125,44 @@ class Regex
125
125
*
126
126
* It is safe to call this method concurrently on the same instance of @a this.
127
127
*/
128
- bool exec (std::string_view subject, uint32_t flags = 0 ) const ;
128
+ bool exec (std::string_view subject) const ;
129
+
130
+ /* * Execute the regular expression.
131
+ *
132
+ * @param subject String to match against.
133
+ * @param flags Match flags (e.g., RE_NOTEMPTY).
134
+ * @return @c true if the pattern matched, @a false if not.
135
+ *
136
+ * It is safe to call this method concurrently on the same instance of @a this.
137
+ */
138
+ bool exec (std::string_view subject, uint32_t flags) const ;
139
+
140
+ /* * Execute the regular expression.
141
+ *
142
+ * @param subject String to match against.
143
+ * @param matches Place to store the capture groups.
144
+ * @return @c The number of capture groups. < 0 if an error occurred. 0 if the number of Matches is too small.
145
+ *
146
+ * It is safe to call this method concurrently on the same instance of @a this.
147
+ *
148
+ * Each capture group takes 3 elements of @a ovector, therefore @a ovecsize must
149
+ * be a multiple of 3 and at least three times the number of desired capture groups.
150
+ */
151
+ int exec (std::string_view subject, RegexMatches &matches) const ;
129
152
130
153
/* * Execute the regular expression.
131
154
*
132
155
* @param subject String to match against.
133
156
* @param matches Place to store the capture groups.
157
+ * @param flags Match flags (e.g., RE_NOTEMPTY).
134
158
* @return @c The number of capture groups. < 0 if an error occurred. 0 if the number of Matches is too small.
135
159
*
136
160
* It is safe to call this method concurrently on the same instance of @a this.
137
161
*
138
162
* Each capture group takes 3 elements of @a ovector, therefore @a ovecsize must
139
163
* be a multiple of 3 and at least three times the number of desired capture groups.
140
164
*/
141
- int exec (std::string_view subject, RegexMatches &matches, uint32_t flags = 0 ) const ;
165
+ int exec (std::string_view subject, RegexMatches &matches, uint32_t flags) const ;
142
166
143
167
// / @return The number of capture groups in the compiled pattern.
144
168
int get_capture_count ();
0 commit comments