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);
}
2025-02-05 15:32
2025-02-05 15:00
2025-02-05 14:42
2025-02-05 14:13
2025-02-05 14:05