aboutsummaryrefslogtreecommitdiffstats
path: root/incdec.pm
diff options
context:
space:
mode:
authorTeddy Wing2021-08-18 01:43:03 +0200
committerTeddy Wing2021-08-18 01:43:25 +0200
commit990ca11c40881d6c4c407007b045d66b61d979d9 (patch)
tree61ba2e940f98b950eab93c20b8c6d1a382c3c245 /incdec.pm
parentea3260541f81be7b288c20da920084271625b1a3 (diff)
downloadreadline-incdec-990ca11c40881d6c4c407007b045d66b61d979d9.tar.bz2
incdec: Add note for myself about what `@-` and `@+` mean
Not what I was thinking when I wrote that looping code.
Diffstat (limited to 'incdec.pm')
-rw-r--r--incdec.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/incdec.pm b/incdec.pm
index 53295e0..19fb951 100644
--- a/incdec.pm
+++ b/incdec.pm
@@ -45,6 +45,7 @@ sub incdec {
$point_position = $original_point_position;
my @matches = $line =~ /(\d+)/g;
print "[[@matches]]";
+ # TODO: @- and @+ hold a list of captured groups. You need to loop through matches to get positions for each match with $-+[0]. It doesn't give you a list of positions of all matches.
print "-[[@-]]-.+[[@+]]+";
# for (my $i = 0; $i < scalar @+ - 1; $i++) {
# print "..$-[$i]:$+[$i]..$point_position..";