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| Modifier and Type | Member | Description |
|---|---|---|
| public | MatchResultMatchResult(value as String): |
Creates a new match result from the matched text. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | toStringtoString() as String: |
Returns the matched text. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | operator!=(left as MatchResult, right as MatchResult) as Boolean: | Value inequality with another match result. |
| public static | operator!=(left as MatchResult, right as String) as Boolean: | Value inequality with a string. |
| public static | operator!=(left as String, right as MatchResult) as Boolean: | Value inequality with a string. |
| public static | operator==(left as MatchResult, right as MatchResult) as Boolean: | Value equality with another match result. |
| public static | operator==(left as MatchResult, right as String) as Boolean: | Value equality with a string. |
| public static | operator==(left as String, right as MatchResult) as Boolean: | Value equality with a string. |