I usually work this out with basic string operations -at times the most reliable.
You are using .Net, so you'll need this on top:
using namespace System;
Create a string called "MyString" and asign it the value of the string in question which in your case will be Champions\Item\Skins\1.jpg
Now, you only need "1".
We'll need only 3 string operations from the .Net Framework which are:
1. SubString
2. LastIndexOf
3. IndexOf
Substring gives you the string starting from the zero-based position you indicate.
SubString(2) on the word "Bike" gives out "ke".
SubString(2,1) in the work "Bike" gives out "k". The second optional argument is the amount of characters you want from the starting point.
LastIndexOf returns the zero-based index of the last occurence of a string within another.
IndexOf returnes the zero-based first occurence of a string within another
Therefore you need to do:
MyString = MyString->Substring( MyString->LastIndexOf("\\") + 1 );
MyString = MyString->Substring(0, MyString->IndexOf(".") );