RandomAccessFile f = new RandomAccessFile("test.txt", "r");String s = "REGION";String sTemp;while ((sTemp = f.readLine()) != null) { for (int i = 0; i < (sTemp.length() - s.length()); i++) { if (sTemp.substring(i, i + s.length()).equals(s)) { //gefunden... } }}f.close();