title: how do you get String Tokenizer to ignore text?
body: <p>I have this code:</p>
  
  <pre><code>public void readTroops() {
          File file = new File("resources/objects/troops.txt");
      StringBuffer contents = new StringBuffer();
      BufferedReader reader = null;
  
      try {
          reader = new BufferedReader(new FileReader(file));
          String text = null;
  
          // repeat until all lines is read
          while ((text = reader.readLine()) != null) {
              StringTokenizer troops = new StringTokenizer(text,"=");
              String list = troops.nextToken();
              String value = troops.nextToken();
  }
  </code></pre>
  
  <p>and this file:</p>
  
  <pre><code>//this is a comment part of the text file//
  
  Total=1
  </code></pre>
  
  <p>the problem is that 1) I cant get it to ignore everything within the //,// and can't get it to read with an 'ENTER' (line) in-between them. For example, this text works:</p>
  
  <pre><code>Total=1
  </code></pre>
  
  <p>So my question is what do I type into the delimiter area ie. </p>
  
  <pre><code>StringTokenizer troops = new StringTokenizer(text,"=","WHAT GOES HERE?");
  </code></pre>
  
  <p>So how can I get Tokenizer to ignore 'ENTER'/new line, and anything in-between // or something similar, thanks. </p>
  
  <p>ps.I don't care if you use a String.split to answer my question.</p>