MatchResult
classin packageklyn.regex
public class MatchResult:
Represents one successful regular-expression match.
The current implementation stores the matched text. It can be compared
directly with a `String` and converts back to the matched text through
`toString()`.
import klyn.regex
match = MatchResult("abc123")
assert match == "abc123"
print(match.value) # abc123
Properties
| Modifier and Type |
Member |
Description |
| public property |
value |
Matched text. |
Constructors
| Modifier and Type |
Member |
Description |
| public |
MatchResult |
Creates a new match result from the matched text. |
Methods
| Modifier and Type |
Member |
Description |
| public override |
toString |
Returns the matched text. |
Operators