MatchSuccess type

Successful match result

Direct parent types

MatchResult
Successful or unsuccessful match result
Direct subtypes: 2

Direct children types

ParamsMatchY
Undocumented

Methods

[](ms:MatchSuccess, name:Str) Source: stdlib.ngs:1149
Get capture by name
[](ms:MatchSuccess, idx:Int) Source: stdlib.ngs:8277
Convenience method to access matches in MatchSuccess

Example

("abc" ~ /a(.)c/)[1]  # "b"
Bool(ms:MatchSuccess) Source: stdlib.ngs:1134
Undocumented

Returns

true
get(ms:MatchSuccess, idx:Int, dflt:Any=null) Source: stdlib.ngs:8279
Get indexed match, returning dflt if the match is not found
init(ms:MatchSuccess, matches:Arr, pattern:Any) Source: stdlib.ngs:1143
Successful match constructor