Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1838957
  • 博文数量: 333
  • 博客积分: 10791
  • 博客等级: 上将
  • 技术积分: 4314
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-08 07:39
文章分类

全部博文(333)

文章存档

2015年(1)

2011年(116)

2010年(187)

2009年(25)

2008年(3)

2007年(1)

分类: Java

2010-10-12 10:57:58


import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.io.*;
import java.net.*;
public class test {
    public int count ;
    private static Hashtable<Integer,String> table = new Hashtable();

    public test(int k){
        count = k;
    }


    public void docount(){
        
    }


    public static void main(String[] args) throws IOException {
        File f = new File("C:\\Users\\lcy644\\Desktop\\Mac.txt");
        BufferedReader br = new BufferedReader(new FileReader(f));
        String content = "";
        String str = "";
        str = br.readLine();
        BufferedWriter bw = new BufferedWriter(new FileWriter(f));
        while((str=br.readLine())!=null){
            String str1 = str.replaceFirst("\\d{1,2}\\.", "");
            content += str1;
            content += "\r\n";
        }
        bw.write(content);
        bw.close();
        
    }

}


阅读(937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~