diff options
-rwxr-xr-x | regcheck.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/regcheck.pl b/regcheck.pl index c5b5f89..a89b562 100755 --- a/regcheck.pl +++ b/regcheck.pl @@ -14,13 +14,14 @@ for my $string (@ARGV) { if (my @matches = $string =~ /$pattern/) { print "\e[0;32mmatches:\e[0m "; if ($#- != 0) { + print "\n"; + my $counter = 0; for my $match (@matches) { - print $match; + print $counter++.": \"".$match."\"\n"; } } else { - print "$&"; + print "$&\n"; } - print "\n"; } else { print "\e[0;31mno match\e[0m\n"; } |