Pattern object either fails to match, or matches with the match length returned.
There is no error reported on where and what exactly failed.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MISMATCH
Returned by |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Pattern | |
| public final Pattern | |
| public final Pattern | |
| private static Pattern | |
| public final Pattern | |
| public final Pattern | |
| public final Pattern | |
| public abstract int | Returns: the number of characters matched. MISMATCH otherwise.the source string. src, int the beginning index in the sequence. begin, int the end index of the source string (exclusive).
end)Note the range is Matches character range against the pattern. |
| public final Pattern | |
| public final Pattern | |
| public final Pattern | |
| public final Pattern | |
| public final Pattern | |
| public final Pattern | repeat(int n)
Deprecated
Use
times(int) instead.
Returns |
| public final Pattern | |
| public final Pattern | Returns: the new Pattern object.the minimal number of times to match. min, int the maximal number of times to match. max)
Deprecated
Use
times(int, int) instead.
Returns |
| public final Pattern | |
| public final Pattern | |
| private static Pattern | |
| public final Parser |
| MISMATCH | back to summary |
|---|---|
| public static final int MISMATCH Returned by | |
| Pattern | back to summary |
|---|---|
| public Pattern() | |
| atLeast | back to summary |
|---|---|
| public final Pattern atLeast(int min) Returns
| |
| atMost | back to summary |
|---|---|
| public final Pattern atMost(int max) Returns
| |
| ifelse | back to summary |
|---|---|
| public final Pattern ifelse(Pattern consequence, Pattern alternative) Returns | |
| ifElse | back to summary |
|---|---|
| private static Pattern ifElse(final Pattern cond, final Pattern consequence, final Pattern alternative) | |
| many | back to summary |
|---|---|
| public final Pattern many() Returns a | |
| many | back to summary |
|---|---|
| public final Pattern many(int min)
Deprecated Use Returns
| |
| many1 | back to summary |
|---|---|
| public final Pattern many1() Returns a | |
| match | back to summary |
|---|---|
| public abstract int match(CharSequence src, int begin, int end) Matches character range against the pattern. The length of the range is
| |
| next | back to summary |
|---|---|
| public final Pattern next(Pattern next) Returns a | |
| not | back to summary |
|---|---|
| public final Pattern not() Returns a | |
| optional | back to summary |
|---|---|
| public final Pattern optional() Returns a | |
| or | back to summary |
|---|---|
| public final Pattern or(Pattern p2) Returns | |
| peek | back to summary |
|---|---|
| public final Pattern peek() Returns | |
| repeat | back to summary |
|---|---|
| public final Pattern repeat(int n)
Deprecated Use Returns
| |
| some | back to summary |
|---|---|
| public final Pattern some(int max)
Deprecated Use Returns
| |
| some | back to summary |
|---|---|
| public final Pattern some(int min, int max)
Deprecated Use Returns
| |
| times | back to summary |
|---|---|
| public final Pattern times(int min, int max) Returns
| |
| times | back to summary |
|---|---|
| public final Pattern times(int n) Returns
| |
| times | back to summary |
|---|---|
| private static Pattern times(final Pattern pp, final int min, final int max) | |
| toScanner | back to summary |
|---|---|
| public final Parser Returns a scanner parser using
| |