こんにちは、私は 2 つの MatchCollection を持っています:
MatchCollection users_ids = Regex.Matches(result, @"url"":""(.*?)""");
MatchCollection users_names = Regex.Matches(result, @"fullname"":""(.*?)""");
2 つのコレクションの数が等しい
すべてのマッチを 1 つのリストに結合する必要があります。次のようにします。
foreach (Match match in users_ids)
{
string id = match.Groups[1].Value.ToString();
// string name = users_names(every match) .Groups[1].Value.ToString();
online_list.Add(id + "|" + name);
}
解決策はありますか?=\