Uses of Class
java.util.regex.Pattern
Packages that usePattern
Package
Description
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
Classes for matching character sequences against patterns specified by regular expressions.
Uses ofPattern injava.util
Modifier and TypeMethodDescriptionScanner.delimiter()
Returns thePattern
thisScanner
is currently using to match delimiters.Modifier and TypeMethodDescriptionReturns a stream of match results from this scanner.Scanner.findInLine
(Pattern pattern) Attempts to find the next occurrence of the specified pattern ignoring delimiters.Scanner.findWithinHorizon
(Pattern pattern, int horizon) Attempts to find the next occurrence of the specified pattern.boolean
Returns true if the next complete token matches the specified pattern.Returns the next token if it matches the specified pattern.Skips input that matches the specified pattern, ignoring delimiters.Scanner.useDelimiter
(Pattern pattern) Sets this scanner's delimiting pattern to the specified pattern.Uses ofPattern injava.util.regex
Methods injava.util.regex that returnPatternModifier and TypeMethodDescriptionstaticPattern
Compiles the given regular expression into a pattern.staticPattern
Compiles the given regular expression into a pattern with the given flags.Matcher.pattern()
Returns the pattern that is interpreted by this matcher.Methods injava.util.regex with parameters of typePatternModifier and TypeMethodDescriptionMatcher.usePattern
(Pattern newPattern) Changes thePattern
that thisMatcher
uses to find matches with.