| Package | Description |
|---|---|
| java.util |
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
|
| java.util.regex |
Classes for matching character sequences against patterns specified by regular expressions.
|
| Modifier and Type | Method and Description |
|---|---|
Pattern |
Scanner.delimiter()
Returns the
Pattern this
Scanner is currently using to match delimiters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
Scanner.findInLine(Pattern
Attempts to find the next occurrence of the specified pattern ignoring delimiters.
|
String |
Scanner.findWithinHorizon(Pattern
Attempts to find the next occurrence of the specified pattern.
|
boolean |
Scanner.hasNext(Pattern
Returns true if the next complete token matches the specified pattern.
|
String |
Scanner.next(Pattern
Returns the next token if it matches the specified pattern.
|
Scanner |
Scanner.skip(Pattern
Skips input that matches the specified pattern, ignoring delimiters.
|
Scanner |
Scanner.useDelimiter(Pattern
Sets this scanner's delimiting pattern to the specified pattern.
|
| Modifier and Type | Method and Description |
|---|---|
static Pattern |
Pattern.compile(String
Compiles the given regular expression into a pattern.
|
static Pattern |
Pattern.compile(String
Compiles the given regular expression into a pattern with the given flags.
|
Pattern |
Matcher.pattern()
Returns the pattern that is interpreted by this matcher.
|
| Modifier and Type | Method and Description |
|---|---|
Matcher |
Matcher.usePattern(Pattern
Changes the
Pattern that this
Matcher uses to find matches with.
|