java.util.regex
public final class Pattern extends Object implements Serializable
Since: 1.4
Field Summary | |
---|---|
static int | CANON_EQ |
static int | CASE_INSENSITIVE |
static int | COMMENTS |
static int | DOTALL |
static int | MULTILINE |
static int | UNICODE_CASE |
static int | UNIX_LINES |
Method Summary | |
---|---|
static Pattern | compile(String regex) |
static Pattern | compile(String regex, int flags) |
int | flags() |
Matcher | matcher(CharSequence input) |
static boolean | matches(String regex, CharSequence input) |
String | pattern() |
String[] | split(CharSequence input) |
String[] | split(CharSequence input, int limit) |
String | toString()
Return the regular expression used to construct this object. |
Parameters: regex The regular expression
Throws: PatternSyntaxException If the expression's syntax is invalid
Parameters: regex The regular expression flags The match flags, a bit mask
Throws: PatternSyntaxException If the expression's syntax is invalid IllegalArgumentException If bit values other than those corresponding to the defined match flags are set in flags
Parameters: input The character sequence to be matched
Parameters: regex The regular expression input The character sequence to be matched
Throws: PatternSyntaxException If the expression's syntax is invalid
Parameters: input The character sequence to be matched
Parameters: input The character sequence to be matched limit The result threshold
Since: 1.5
UNKNOWN: Prior to JDK 1.5 this method had a different behavior