@@ -55,7 +55,7 @@ Special Variables
55
55
### Match Variables ###
56
56
57
57
----------------------------------------------------- -----------------------------------------------------------------------------
58
- [`$/`](appendix-a-index.html#slash-var) last created match object of this block
58
+ [`$/`](appendix-a-index.html#slash-var) last created match object of this [ block](appendix-g-glossary.html#block)
59
59
[`$<...>`](appendix-a-index.html#angle-brackets-var) alias to named capture, see Twigils above
60
60
[`$0 ...`](appendix-a-index.html#0-var) alias to positional capture, like in P5 - `$1 .. $9` but doesn't stop at `$9`
61
61
[`@()`](appendix-a-index.html#round-brackets-var) array that holds $0 .. $9 and rest and positional submatches
@@ -845,6 +845,20 @@ regex. They can have prefixes: . (dot) marks a non-capturing subrule,
845
845
[`<!>`](#exclamation-subrule) always false
846
846
----------------------------------------------- -------------------------------------------------
847
847
848
+ Match Object Methods
849
+ --------------------
850
+
851
+ $/.from # the initial match position
852
+ $/.to # the final match position
853
+ $/.chars # $/.to - $/.from
854
+ $/.orig # the original match string
855
+ $/.Str # substr($/.orig, $/.from, $/.chars)
856
+ $/.ast # the abstract result associated with this node
857
+ $/.caps # sequential captures
858
+ $/.chunks # sequential tokenization
859
+ $/.prematch # $/.orig.substr(0, $/.from)
860
+ $/.postmatch # $/.orig.substr($/.to)
861
+
848
862
849
863
Flow Control
850
864
============
0 commit comments