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();
}
}
|