更新时间:2023-02-26 11:33:52
您已经有了解决方案.只需将Group
替换为Value
.希望对您有帮助.
You already have the solution. Just replace theGroup
with yourValue
. Hope it will help you.
int i=0;
foreach (Match m in matches)
{
System.Console.WriteLine(m.Groups[1]);
//for (int i = 0; i <= m.Length; i++)
{
//ReplaceableValue = ReplaceableValue.Replace(m.Value.ToString(), array[i]);
ReplaceableValue = ReplaceableValue.Replace(m.Groups[1].ToString(), array[i++]);
}
}
System.Console.WriteLine(ReplaceableValue);