mu-regex: add match_groups, use everywhere

Add match_groups to Mu::Regex, and update old "raw" GRegex users.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-23 13:38:38 +03:00
committed by Seth Ladygo
parent 31e5c7b34e
commit 7e83f5e4b0
6 changed files with 122 additions and 46 deletions

View File

@ -402,9 +402,7 @@ message(const Regex& rx, size_t id)
char buf[16];
::snprintf(buf, sizeof(buf), "%zu", id);
return to_string_gchar(
g_regex_replace(rx, test_msg, -1, 0, buf,
G_REGEX_MATCH_DEFAULT, {}));
return unwrap(rx.replace(test_msg, buf));
}
struct TestData {