我似乎无法弄清楚如何从说Rogue Assassin 2007
和返回中获取年份:
moviename = "Rogue Assassin" 'Whitespace doesn't matter
movieyear = "2007" 'Whitespace doesn't matter
但是,我无法让它工作。我一直在尝试以下方法:
If System.Text.RegularExpressions.Regex.IsMatch(fn, "[0-9][0-9][0-9][0-9]") Then 'Is this right?
Dim mtemp As String() = fn.Split(" ") 'Movie temp array
myear(0) = mtemp.Last 'Attempting to set year to the last split
For Each z As String In mtemp 'Adding the other elements in mtemp together to remake the title
If z IsNot mtemp.Last Then
mtitle(0) = z & " " 'Movie title
Else
Exit For
End If
Next
...
Else
...
End If
非常感谢任何帮助!