Dim MyExpression As New _ System.Text.RegularExpressions.Regex("^[0-9]+(.[0-9]{2})?$") Dim MyCharA As String = "1972.06" If (MyExpression.IsMatch(MyCharA)) Then '合法两位小数 Else ’非法的两位小数 End If