summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
30ff4d3)
Also display an error message if a regex doesn't contain a match group.
my @matches;
while ($input->{string} =~ /$regex/g) {
my @matches;
while ($input->{string} =~ /$regex/g) {
+ my $offset = $-[1];
+ die "Match group required in regex '$regex'" if not defined $offset;
+
my ($x, $y) = input_match_offset_to_coordinates($input->{width},
my ($x, $y) = input_match_offset_to_coordinates($input->{width},
push @matches, { x => $x, y => $y, string => $1 };
}
return @matches;
push @matches, { x => $x, y => $y, string => $1 };
}
return @matches;