Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java 1.0.4 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----com.ibm.xml.omake.Regexp
Special characters are `. * + ? [ ( ) | \'.
Parensises make groups of in a regular expression and applications can know
where in target text each group matched with getMatchedBeginnig() getMatchedEnd()
getMatchedString()
after match() exactMatch()
.
The 0th group means whole of this regular expression.
The Nth gorup is the inside of the Nth left parensis.
Constructor Summary | |
Regexp(java.lang.String regexp)
|
Method Summary | |
boolean | exactMatch(java.lang.String target)
|
int | getMatchedBeginning(int index)
|
int | getMatchedEnd(int index)
|
java.lang.String | getMatchedString(int index)
|
int | getNumberOfGroups()
|
static void | main(java.lang.String[] argv)
|
int | match(java.lang.String target)
|
java.lang.String | toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Regexp(java.lang.String regexp) throws RegexpParseException
regexp
- A regular expression
Method Detail |
public java.lang.String toString()
public int match(java.lang.String target)
public boolean exactMatch(java.lang.String target)
public int getMatchedBeginning(int index)
This method doesn't return valid value before calling match()/exactMatch()
.
index
- Less than getNumberOfGroups().
public int getMatchedEnd(int index)
This method doesn't return valid value before calling match()/exactMatch()
.
index
- Less than getNumberOfGroups().
public java.lang.String getMatchedString(int index)
This method doesn't return valid value before calling match()/exactMatch()
.
index
- Less than getNumberOfGroups().
public int getNumberOfGroups()
public static void main(java.lang.String[] argv)
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |