public class countwords {
public static void main(String[] args) {
String con="";
List<Integer> list=new ArrayList<>();
List<Integer> list1=new ArrayList<>();
try {
BufferedReader in=new BufferedReader(new InputStreamReader
(new FileInputStream("F://3d50fbd8-2374-4cd7-a021-b29c32e4117f.txt"),"utf-8"));
String str=null;
while ((str=in.readLine())!=null){
con=con+str;
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
String key = "<uuid>";
int startindex = 0;
while ((startindex = con.indexOf(key, startindex)) >= 0) {
list.add(startindex);
startindex += key.length();
}
String key2="</uuid>";
int endindex = 0;
while ((endindex = con.indexOf(key2, endindex)) >= 0) {
list1.add(endindex);
endindex += key2.length();
}
for (int i = 0; i <list.size() ; i++) {
String getwords=con.substring(list.get(i)+8,list1.get(i));
System.out.println(getwords);
}
}
}