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-28 18:37
2024-12-28 18:22
2024-12-28 17:30
2024-12-28 16:48
2024-12-28 16:24