正则表达式取某目录下的文件名



  //用正则表达式求末尾文件
  private string GetFileName(string FullName)
  {
     Regex re=new Regex(@"""[^""]*$");
     Match ma=re.Match(FullName);
     if( ma.Success)
       return ma.Value.Substring(1);
     else
       return "";
  }

posted on 2008-05-23 16:12  步走高飞  阅读(1303)  评论(0编辑  收藏  举报

导航