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-23 07:00
2024-12-23 06:56
2024-12-23 06:09
2024-12-23 04:31
2024-12-23 04:20