取string bedName中的数字部分
string pattern = @"(?<num>[\-]?(0|[1-9][0-9]*)[\.]?\d*)";
string tc = bedName;
int num = 0;
Match m = Regex.Match(tc, pattern, RegexOptions.IgnoreCase | RegexOptions.Singleline);
if (m.Success)
{
num = (int.Parse)(m.Groups["num"].Value);
}