net代码怎么获取第二行的数字字符串
public static string IgetNumber(string str)
{
return System.Text.RegularExpressions.Regex.Replace(str, @"[^\d{ 2}-]*", "");
}
public static void Main()
{
string a=IgetNumber("武汉房权证字号第-号");
string b=IgetNumber("武汉房权证字号第号");
Console.WriteLine(a);
Console.WriteLine(b);
}
2024-12-26 11:46
2024-12-26 10:55
2024-12-26 10:52
2024-12-26 10:17
2024-12-26 10:07