Then try just \d\d without quotes. On my system, it worked for \d\d and
for "\d\d", but NOT for "\\d\\d", which returned only "found null." My
code was slightly different:
[code]
import java.util.*;
import java.io.*;
public class TestScan {
public static void main(
String[] args) {
String token = null;
System.out.println("Input: ");
System.out.flush();
try {
Scanner sc = new Scanner(System.in);
do {
token = sc.findInLine(args[0]);
System.out.println("Found: " + token);
} while (token != null);
System.in.close();
} catch(IOException io) { System.out.println(io.getMessage()); }
}
}
[code]
[ November 11, 2008: Message edited by: Ken Truitt ]