I have code in C#
string fileNameOnly = Path.GetFileNameWithoutExtension(sKey);
string token = fileNameOnly.Remove(fileNameOnly.LastIndexOf('_'));
string number = new string(token.SkipWhile(Char.IsLetter).ToArray());
And i want it in VB
Dim fileNameOnly As String = Path.GetFileNameWithoutExtension(sKey)
Dim token As String = fileNameOnly.Remove(fileNameOnly.LastIndexOf("_"c))
Dim number As New String(token.SkipWhile([Char].IsLetter).ToArray())
I have tried that but did not work! Is there something similar to use.
What it does is look at a file name and only use the number part of it and skip all letters and all after _
.