what am I doing wrong with java.util.Scanner?
<p>This is my Java 1.5 code (complete example):</p>

<pre><code>import org.junit.Test;
import static org.junit.Assert.*;
import java.util.Scanner;
import java.util.regex.Pattern;
public class StrangeTest {
  @Test
  public void testRegExp() {
    Pattern re = Pattern.compile("(;|:)[^:;]*");
    Scanner scanner = new Scanner(":alpha");
    scanner.useDelimiter("");
    assertEquals(":alpha", scanner.next(re)); // failure
  }
}
</code></pre>

<p>What is wrong here?</p>
