public abstract class RegexResult extends AbstractConstantKeysObject
RegexResult is a TruffleObject that represents the result of matching a regular
expression against a string. It can be obtained as the result of a RegexObject's
exec method and has the following properties:
boolean isMatch: true if a match was found, false otherwise.TruffleObject getStart(int groupNumber): returns the position where the
beginning of the capture group with the given number was found. If the result is no match, the
returned value is undefined. Capture group number 0 denotes the boundaries of the entire
expression. If no match was found for a particular capture group, the returned value is
-1.TruffleObject end: returns the position where the end of the capture group
with the given number was found. If the result is no match, the returned value is undefined.
Capture group number 0 denotes the boundaries of the entire expression. If no match was
found for a particular capture group, the returned value is -1.| Constructor and Description |
|---|
RegexResult() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getEnd(int groupNumber) |
TruffleReadOnlyKeysArray |
getKeys() |
Object |
getMembers(boolean includeInternal) |
abstract int |
getStart(int groupNumber) |
Object |
readMemberImpl(String symbol) |
hasMembersgetLanguage, hasLanguage, toDisplayStringpublic abstract int getStart(int groupNumber)
public abstract int getEnd(int groupNumber)
public Object getMembers(boolean includeInternal)
getMembers in class AbstractConstantKeysObjectpublic TruffleReadOnlyKeysArray getKeys()
getKeys in class AbstractConstantKeysObjectpublic final Object readMemberImpl(String symbol) throws com.oracle.truffle.api.interop.UnknownIdentifierException
readMemberImpl in class AbstractConstantKeysObjectcom.oracle.truffle.api.interop.UnknownIdentifierException