首页 > 其他 > 详细

Get file name without extension.

时间:2014-03-03 02:02:41      阅读:571      评论:0      收藏:0      [点我收藏+]

Ref:How to get file name without the extension?

Normally,there are two ways to implements this:use the library or the regular expression.

here I use the regular expression.

bubuko.com,布布扣
1 String s = "a.xml.ac.df.ef";
2 String result = s.replaceFirst("[.][^.]+$", "");
3 System.out.println(result);    
//outputs:a.xml.ac.df    
bubuko.com,布布扣

Get file name without extension.,布布扣,bubuko.com

Get file name without extension.

原文:http://www.cnblogs.com/listened/p/3576275.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!