Skip to content

Commit 1baf5fe

Browse files
committed
rebrand $/.before as .prematch and .after as .postmatch
I have been told on #perl6 that the old names are unclear, this seems to be the new consensus
1 parent d1f6d86 commit 1baf5fe

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

S05-regex.pod

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,16 +2837,16 @@ the match. For example:
28372837

28382838
The currently defined methods are
28392839

2840-
$/.from # the initial match position
2841-
$/.to # the final match position
2842-
$/.chars # $/.to - $/.from
2843-
$/.orig # the original match string
2844-
$/.Str # substr($/.orig, $/.from, $/.chars)
2845-
$/.ast # the abstract result associated with this node
2846-
$/.caps # sequential captures
2847-
$/.chunks # sequential tokenization
2848-
$/.before # text before the match
2849-
$/.after # text after the match
2840+
$/.from # the initial match position
2841+
$/.to # the final match position
2842+
$/.chars # $/.to - $/.from
2843+
$/.orig # the original match string
2844+
$/.Str # substr($/.orig, $/.from, $/.chars)
2845+
$/.ast # the abstract result associated with this node
2846+
$/.caps # sequential captures
2847+
$/.chunks # sequential tokenization
2848+
$/.prematch # $/.orig.substr(0, $/.from)
2849+
$/.postmatch # $/.orig.substr($/.to)
28502850

28512851
Within the regex the current match state C<$¢> also provides
28522852

0 commit comments

Comments
 (0)