title: string matching problem?
body: <p>i want to parse a textfile. if ":" occurs then i want to split the array in two pieces. the second piece gets investigated further: if it contains "in " (note the space, this is important) or "out " the arraylist ports gets populated. if neither "in " nor "out " is in the second half of the original string, generics gets populated. i tried it with the following code:</p>
  
  <pre><code>if (str.matches("\\:")) {
    String[] splitarray = str.split("\\:");
    if (splitarray[1].matches("in ")) {
      ports.add(str);
    } else {  
      if (splitarray[1].matches("out ")) {
        ports.add(str);
      } else {
        generics.add(str);
      }
    }
  }
  </code></pre>