判断用户输入的货币格式是否合法:
public bool validMoney(string str) { return Regex.IsMatch(str,"^\d+(\.\d+)?元$"); }
}