110,538
社区成员
发帖
与我相关
我的任务
分享
string s = "our address is: 9 (2): 86-91";
Match match = Regex.Match(s, @"our address is:\s*(\d+)\s*\((\d+)\):\s*([0-9\-]+)");
string r = string.Format(@"our address is district {0}, no. {1}, block {2}", match.Groups[1].Value, match.Groups[2].Value, match.Groups[3].Value);
Console.Write(r);
Console.ReadKey();