Imports system.collections.generic
Dim fileName as string = "this_that_12345678901234"
If fileName.Contains("_") Then
Dim splitFile As String() = fileName.Split(CType("_", Char))
If splitFile.length = 3 Then
For i As Integer = 0 To 2
If i = 2 andalso Not RegularExpressions.Regex.IsMatch(splitFile(i), "^[0-9 ]+$") Andalso splitFile(i).Length <> 14 Then
ElseIf Not RegularExpressions.Regex.IsMatch(splitFile(i), "^[a-zA-Z0-9]+$") Then
retbool2 =(RegularExpressions.Regex.IsMatch(splitFile(0), "^[a-zA-Z0-9]+$") Andalso RegularExpressions.Regex.IsMatch(splitFile(1), "^[a-zA-Z0-9]+$") andalso RegularExpressions.Regex.IsMatch(splitFile(2), "^[0-9 ]+$") andalso splitFile(2).Length = 14)
console.writeline(retbool)
console.writeline(retbool2)