Java StringTokenizer troubles - Newbie
<p>I know I'm probably being incredibly stupid here, but can anybody shed any light on my problem? I'm trying to extract the title from a string containing html...</p>

<pre><code> public static void main(String args[]) {
  System.out.println(getTitle("&lt;title&gt;this is it&lt;/title&gt;"));
 }

 public static String getTitle(String a) {
  StringTokenizer token = new StringTokenizer(a, "&lt;title&gt;", false);
  return token.nextToken("&lt;/title&gt;");
 }
</code></pre>

<p>Keeps returning "h" and I can't work out why! Am is being naive? </p>

<p>Cheers</p>
