Scanner.next() from a BufferedReader
<p>I am trying to scan text from a reader based on a delimiter <code>"()()"</code> by using the <code>Scanner.next()</code> method. Here is my code:</p>

<pre><code>public static void main(String[] args)
{
    String buffer = "i want this text()()without this text()()";

    InputStream in = new ByteArrayInputStream(buffer.getBytes());
    InputStreamReader isr = new InputStreamReader(in);
    BufferedReader reader = new BufferedReader(isr);

    Scanner scan = new Scanner(reader);
    scan.useDelimiter("/(/)/(/)");
    String found = scan.next();
    System.out.println(found);
}
</code></pre>

<p>The problem is, the entire buffer is returned: </p>

<pre><code>i want this text()()without this text()()
</code></pre>

<p>I only want the first next() iteration to return: </p>

<pre><code>i want this text
</code></pre>

<p>and the next next() iteration to return: </p>

<pre><code>without this text
</code></pre>

<p>Any suggestions how I can scan the reader by only delimiting strings ending in <code>()()</code>?</p>
