вторник, 22 марта 2011 г.

Select filename from file path


To get file name from file path by Regex:

string file = Regex.Match(FilePath, @"(?<=([\\/]))([^\\/])*?$").Value;

Example:
FilePath="/UI/Pages/WorkItems/QueryExplorer.aspx"
file="QueryExplorer.aspx"

1 комментарий: