- pattern
- the string specifying the pattern to scan for.
Documentation for this section has not yet been entered.
Type Reason Java.Lang.IllegalStateException if this Scanner has been closed. Java.Util.NoSuchElementException if input has been exhausted. Java.Util.InputMismatchException if the next token does not match the pattern given.
Returns the next token if it matches the specified pattern. The token will be both prefixed and suffixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read. Calling this method is equivalent to next(Pattern.compile(pattern)).