C:\Users\asus\AppData\Local\Temporary Projects\ConsoleApplication1\bin\Release\sfref.txt
文字列を分割して取得する方法sfref.txt
C:\Users\asus\AppData\Local\Temporary Projects\ConsoleApplication1\bin\Release\sfref.txt
文字列を分割して取得する方法sfref.txt
正規表現は必要ありません...
System.IO.Path.GetFilename(fullpath);
Path.GetFileNameメソッドを使用します。
var path = @"C:\Users\asus\AppData\Local\Temporary Projects\ConsoleApplication1\bin\Release\sfref.txt";
string name = Path.GetFileName(path); // sfref.txt
本当に正規表現でそれを行う必要がある場合 (私がアドバイスしないこと):
string name = Regex.Match(path, @"[^\\]*$").Value;