package actor;
import tool.*;
public class pro {
int datanumber;
String[] data=new String[5000];
String[] code=new String[5000];
double[] point=new double[5000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readfile sub2=new readfile();
sub2.makedata("ren.txt","UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
String a="キャスト&スタッフ</th>";
int tr=11;
for(tr=1;tr<datanumber+1;tr++){
int p1=data[tr].indexOf(a);
p1=data[tr].indexOf("チーフP :",p1);
int p2=data[tr].indexOf("<br>",p1);
int p3=data[tr].indexOf("</td>",p1);
if (p2<0)p2=999999;
if (p3<p2)p2=p3;
String strx="";
if(p1>-1)strx=data[tr].substring(p1,p2);
System.out.println(strx);
strx=strx.replace("etc","");
strx=strx.replace("チーフP :","");
strx=clean_str(strx);
String[] x=strx.split("、");
int s;
for(s=0;s<x.length;s++){
System.out.println(tr+","+x[s].trim());
}
}
}
String clean_str(String str){
int m;
String strx=str;
for(m=1;m<15;m++){
strx=fresh(strx);
}
strx=strx.replace(" ","");
strx=strx.replace(" ","");
strx=strx.replace(";","");
return strx;
}
String fresh(String str){
int p1=str.indexOf("<");
int p2=str.indexOf(">",p1);
String sp="";
if(p1>-1)sp=str.substring(p1,p2+1);
String k=str.replace(sp,"");
return k;
}
}
最終更新:2018年02月07日 08:28