| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--COM.stevesoft.pat.RegRes
| Field Summary | |
| int | charsMatched_
|
| boolean | didMatch_
|
| int[] | marks
|
| int | matchFrom_
|
| int | numSubs_
|
| java.lang.String | src
|
| Constructor Summary | |
| RegRes()
|
|
| RegRes(RegRes r)
|
|
| Method Summary | |
| int | charsMatched(int i)
Obtains the number of characters matched by backreference i, or -1 if backreference i was not matched. |
| int | charsMatched()
After a successful match, this returns the number of characters in the match, or -1 if the match failed. |
| java.lang.Object | clone()
|
| boolean | didMatch()
Contains true if the last match was successful. |
| boolean | equals(RegRes r)
|
| java.lang.String | getString()
Obtain the text String that was matched against. |
| java.lang.String | left()
This returns the part of the string that preceeds the match, or null if the match failed. |
| java.lang.String | left(int i)
This returns the part of the string that follows the ith backreference, or null if the backreference did not match. |
| int | matchedFrom(int i)
Obtains the position backreference number i begins to match, or -1 if backreference i was not matched. |
| int | matchedFrom()
After a successful match, this returns the location of the first matching character, or -1 if the match failed. |
| int | matchedTo(int i)
This is either equal to matchedFrom(i)+charsMatched(i) if the match was successful, or -1 if it was not. |
| int | matchedTo()
This is matchedFrom()+charsMatched() after a successful match, or -1 otherwise. |
| int | matchFrom()
An older name for matchedFrom. |
| int | matchFrom(int i)
An older name for matchedFrom. |
| int | numSubs()
This returns the number of backreferences (parenthesis) in the pattern, i.e. the pattern "(ab)" has one, the pattern "(a)(b)" has two, etc. |
| java.lang.String | right()
This returns the part of the string that follows the match, or null if the backreference did not match. |
| java.lang.String | right(int i)
This returns the string to the right of the ith backreference, or null if the backreference did not match. |
| java.lang.String | stringMatched()
Obtains the match if successful, null otherwise. |
| java.lang.String | stringMatched(int i)
Obtains a substring matching the nth set of parenthesis from the pattern. |
| java.lang.String | substring()
An older name for stringMatched(). |
| java.lang.String | substring(int i)
An older name for stringMatched. |
| java.lang.String | toString()
|
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected int[] marks
protected boolean didMatch_
protected java.lang.String src
protected int charsMatched_
protected int matchFrom_
protected int numSubs_
| Constructor Detail |
public RegRes()
public RegRes(RegRes r)
| Method Detail |
public java.lang.String getString()
public java.lang.String toString()
public java.lang.Object clone()
public boolean equals(RegRes r)
public java.lang.String stringMatched()
public int matchedFrom(int i)
public int charsMatched(int i)
public int matchedTo(int i)
public java.lang.String stringMatched(int i)
public java.lang.String left()
public java.lang.String left(int i)
public java.lang.String right()
public java.lang.String right(int i)
public int matchedFrom()
public int charsMatched()
public int matchedTo()
public int numSubs()
public boolean didMatch()
public int matchFrom()
public java.lang.String substring()
public int matchFrom(int i)
public java.lang.String substring(int i)
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||