import java.io.*;
class person{
int s,sx,p1,h;
String data,data1;
String[] cr=new String[10000];
int clong;
String x1;
public static void main(String [] args) {
person test=new person();
}
person(){
readfile("data/5010.txt");
p1=data.indexOf("○");
data1=data.substring(0,p1);
String[] x=data1.split("<BR>");
sx=0;
for(s=0;s<x.length;s++){
clong=x[s].length();
x1=x[s].substring(clong-1,clong);
if(x1.equals("君"))sx=sx+1;
if(x1.equals("君"))cr[sx]=x[s];
}
for(s=1;s<sx+1;s++){
System.out.println(cr[s]);
}
}
void readfile(String file){
String str;
BufferedReader br;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"SJIS"));
while((str = br.readLine()) != null) {
data=data+str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
}
}
最終更新:2011年06月27日 11:59