
Originally Posted by
The_Patzer
I am going nuts with regex as well :P anyone care to help me parse "341" out of the string below please:
you should start a new thread really.
try this
vb.net Code:
Dim testStr As String = "Score 341 0"
Dim rx As New Regex("(?<=Score( )*)\d*(?=( )*0)", RegexOptions.IgnoreCase)
MsgBox(rx.Match(testStr).Value)
it'd be easier without regex:
vb.net Code:
Dim testStr As String = "Score 341 0"
Dim strArray() As String = testStr.Split(New String() {" "}, StringSplitOptions.RemoveEmptyEntries)
msgbox (strArray(1))