Dim s1 As String = "甘草(500mg)" Dim s2 As String = "甘草(0.5g)" Dim s3 As String = "甘草(0.45g)"
If s2.Split("(")(1).Split(")")(0).Split("g")(0) * 1000 = s1.Split("(")(1).Split(")")(0).Split("m")(0) Then Output.Show("相等") Else Output.Show("不等") End If
If s3.Split("(")(1).Split(")")(0).Split("g")(0) * 1000 = s1.Split("(")(1).Split(")")(0).Split("m")(0) Then Output.Show("相等") Else Output.Show("不等") End If