I've constructed a regular expression which I compile to a Pattern to find Fortran Real*8 numbers. The tricky bit is that the file I'm reading from is a single line with a few million columns.. When I do this:
Scanner recordScanner = new Scanner(recordString);
String foundReal = recordScanner.findInLine(real8Regex);
I get what I'm looking for, but when I use the next(Pattern) method, I get an InputMismatchException.. Strange, considering both findInLine and next return Strings.
Scanner recordScanner = new Scanner(recordString);
String foundReal = recordScanner.next(real8Regex);
Am I missing something crucial in the use of the next() method?