diff options
Diffstat (limited to 'incdec.pm')
| -rw-r--r-- | incdec.pm | 12 | 
1 files changed, 7 insertions, 5 deletions
| @@ -13,15 +13,17 @@ sub incdec {  	my @points = ();  	my $previous_match_start = 0;  	my $previous_match_end = 0; +	print "$line\n";  	while ($line =~ /(\d+)/g) {  		if ($is_backward) { -			# print "pos[$point_position] -[$-[0]]- +[$+[0]]+\n"; +			print "pos[$point_position] -[$-[0]]- +[$+[0]]+\n"; +			print "pos[$point_position] -[$previous_match_start]- +[$previous_match_end]+\n";  			# if $point_position < $-[0]  			# && previous $+[0] <= $point_position -			# if ($previous_match_end <= $point_position && $point_position < $-[0]) { -			if ($-[0] <= $point_position && $point_position < $+[0]) { -				# print "matched"; -				$start_position = $-[0]; +			if ($previous_match_end - 1 <= $point_position && $point_position < $-[0]) { +			# if ($-[0] <= $point_position && $point_position < $+[0]) { +				print "matched at $-[0];$previous_match_end\n"; +				$start_position = $previous_match_start;  				last;  			} | 
