请教一下,想要从下列的下拉菜单中提取到第一位的代码数值,如:每次只提取1或者2或者3或者4,点后面的都不要
1.(0.5-1.0cm)
2.(1.0-1.5cm)
3.(1.5-2.0cm)
4.(2.0-3.0cm)
下列代码中的str=。。 应该怎么修改呢?
If e.DataCol.Name = "NYHA分级"
If e.NewValue > "" Then
Dim str As String = e.NewValue
str = System.Text.RegularExpressions.Regex.replace(str, "[^0-9|]", "")
e.DataRow("NYHA代码") = str
Else
e.DataRow("NYHA代码") = Nothing
End If
End If