|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.regex.Matcher
public class Matcher
Method Summary | |
---|---|
Matcher |
appendReplacement(java.lang.StringBuffer sb,
java.lang.String r)
|
java.lang.StringBuffer |
appendTail(java.lang.StringBuffer sb)
|
int |
end()
|
int |
end(int i)
|
boolean |
find()
|
boolean |
find(int idx)
|
java.lang.String |
group()
|
java.lang.String |
group(int i)
|
int |
groupCount()
|
boolean |
lookingAt()
|
boolean |
matches()
Determine whether a match was found in the string. |
Pattern |
pattern()
Report the Pattern that this Matcher
is supposed to use. |
static java.lang.String |
quoteReplacement(java.lang.String r)
Function that may be helpful when calling replaceAll ,
replaceFirst ,
etc. |
java.lang.String |
replaceAll(java.lang.String r)
Apply the same replacement text to all matches in the target string. |
java.lang.String |
replaceFirst(java.lang.String r)
|
Matcher |
reset()
|
Matcher |
reset(java.lang.CharSequence newseq)
|
int |
start()
|
int |
start(int i)
|
MatchResult |
toMatchResult()
The intent on this function in the Sun Java API seems to be to return an immutable object of some private class. |
java.lang.String |
toString()
|
Matcher |
usePattern(Pattern pat)
Change what pattern this Matcher is using. |
Method Detail |
---|
public Pattern pattern()
Pattern
that this Matcher
is supposed to use.
public Matcher usePattern(Pattern pat)
public MatchResult toMatchResult()
Matcher
public Matcher reset()
public Matcher reset(java.lang.CharSequence newseq)
public java.lang.String group()
group
in interface MatchResult
public java.lang.String group(int i)
group
in interface MatchResult
public int start()
start
in interface MatchResult
public int start(int i)
start
in interface MatchResult
public int end()
end
in interface MatchResult
public int end(int i)
end
in interface MatchResult
public int groupCount()
groupCount
in interface MatchResult
public boolean matches()
Pattern.Matcher()
creates a Matcher
that is already trying
to match in the first possible place in the target string.
public boolean find()
public boolean find(int idx)
public boolean lookingAt()
public static java.lang.String quoteReplacement(java.lang.String r)
replaceAll
,
replaceFirst
,
etc.
public java.lang.String replaceAll(java.lang.String r)
s///g
.
public java.lang.String replaceFirst(java.lang.String r)
public Matcher appendReplacement(java.lang.StringBuffer sb, java.lang.String r)
public java.lang.StringBuffer appendTail(java.lang.StringBuffer sb)
public java.lang.String toString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |