|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.regex.Pattern
public class Pattern
Field Summary | |
---|---|
static int |
CANON_EQ
Ignored in this version of this implementation |
static int |
CASE_INSENSITIVE
Like the /i flag in perl |
static int |
COMMENTS
Like the /x flag in perl |
static int |
DOTALL
Like the /s flag in perl |
static int |
LITERAL
Turns off recognition of all metacharacters |
static int |
MULTILINE
Like the /m flag in perl |
static int |
UNICODE_CASE
Perl 5.8 semantics instead of perl 5.004 semantics; but ignored in this implementation |
static int |
UNIX_LINES
Ignored in this implementation |
Method Summary | |
---|---|
static Pattern |
compile(java.lang.String s)
|
static Pattern |
compile(java.lang.String s,
int flags)
|
int |
flags()
|
Matcher |
matcher(String seq)
Prepare to match this pattern against the given subject string. |
static boolean |
matches(String pat,
String seq)
Indicate whether the given pattern matches the given subject string. |
java.lang.String |
pattern()
|
static java.lang.String |
quote(java.lang.String s)
|
String[] |
split(String seq)
Return the strings seperated by the given delimiter-expression. |
String[] |
split(String seq,
int count)
Return the strings separated by the given delimiter-expression. |
java.lang.String |
toString()
|
Field Detail |
---|
public static final int UNIX_LINES
public static final int CASE_INSENSITIVE
/i
flag in perl
public static final int COMMENTS
/x
flag in perl
public static final int MULTILINE
/m
flag in perl
public static final int LITERAL
public static final int DOTALL
/s
flag in perl
public static final int UNICODE_CASE
public static final int CANON_EQ
Method Detail |
---|
public static Pattern compile(java.lang.String s)
public static Pattern compile(java.lang.String s, int flags)
public java.lang.String pattern()
public java.lang.String toString()
public Matcher matcher(String seq)
Pattern
may be shared between threads, while a
Matcher
may not.
seq
- The subject string. Note that this is a CharSequence in Sun Java 1.5.public int flags()
public static boolean matches(String pat, String seq)
pat
- A regular expressionseq
- The target string. Note that this is a CharSequence in Sun Java 1.5.public String[] split(String seq, int count)
seq
- The subject string. Note that this is a CharSequence in Sun Java 1.5.count
- The maximum number of groups to produce.public String[] split(String seq)
seq
- The subject string. Note that this is a CharSequence in Sun Java 1.5.public static java.lang.String quote(java.lang.String s)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |