public class RegExMatcher extends Object:
Iterates over the matches of a regular expression against one input string.
Matchers are created by RegEx.matcher. Each successful call to find updates the value returned by group, start, and end.
import klyn.regex
matcher = RegEx(r"([A-Za-z]+):(\d+)").matcher("alpha:12 beta:34")
while matcher.find():
print(matcher.group(1), matcher.group(2))| Modifier and Type | Member | Description |
|---|---|---|
| public native | end | Returns the exclusive end offset of a captured group in the input. |
| public native | findfind() as Boolean throws RegExException |
Searches for the next occurrence of the regular expression. |
| public native | group | Returns the text captured by the current match or one of its groups. |
| public native | resetreset() as Void |
Restarts matching at the beginning of the original input. |
| public native | start | Returns the inclusive start offset of a captured group in the input. |