As another answer is mentioned, use an XML parser to get the value between the tags. Once this is done, if your text definitely has a format description : <value>
, the most efficient way would be to split the line
Dim description As String = node.Value
Dim value As Integer = Integer.Parse(description.Split(": ")(1).Trim())
, :
-, Integer.TryParse
. , :
,
Dim a() Ad String = description.Split(":")
Dim val As Integer
If Not Integer.TryParse(a(a.Length - 1), val) Then
MessageBox.Show("Value is not found")
Else
MessageBox.Show("Value is " & val.ToString())
End If
Regex
. , Regex