title: how to escape escape characters in Java
body: <p>I have a large file that contains \' that I need to find. I've tried variations of the following but it's not working:</p>
  
  <pre><code>do{           
         line =  TextFileIO.readLine(bufferedReader);           
         if(line != null){
             TextFileIO.writeLine(bufferedWriter,line); 
  
             for (int i = 0; i &lt; line.length() - 1; i++){
  
                if(line.substring(i,i+1).equals("\\\'"))System.out.println("we found it " + line);
  
             }
          }
  
      }while (line != null);
  </code></pre>