| Constructor and Description |
|---|
JavaRegExp(java.lang.String pattern) |
JavaRegExp(java.lang.String pattern,
boolean supportMatches) |
JavaRegExp(java.lang.String pattern,
int matchFlags) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMatch()
Returns the part of the string that matched the pattern.
|
java.lang.String |
getMatch(int index)
Returns the substring that matched one of the parenthesized subexpressions of the regular expression.
|
int |
getMatchCount()
Returns the number of parenthesized subexpressions in the regular expression.
|
int |
getMatchFlags()
Return the match flags
|
boolean |
matches(java.lang.String stringToCompare)
Determines whether the regular expression pattern matches the
provided string.
|
public JavaRegExp(java.lang.String pattern)
public JavaRegExp(java.lang.String pattern,
int matchFlags)
public JavaRegExp(java.lang.String pattern,
boolean supportMatches)
public java.lang.String getMatch()
IRegExgetMatch(0).public java.lang.String getMatch(int index)
IRegExindex indicates which substring should be returned. An index of
0 returns the entire matched string, an index of 1 returns the matched substring for the first
parenthesized subexpression of the regular expression, etc.public int getMatchCount()
IRegExgetMatchCount in interface IRegExpublic boolean matches(java.lang.String stringToCompare)
IRegExpublic int getMatchFlags()
getMatchFlags in interface IRegEx