projects
/
lab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* output matched pattern with "/PATTERN/"
[lab.git]
/
misc
/
regexfilter.pl
diff --git
a/misc/regexfilter.pl
b/misc/regexfilter.pl
index
801cbb0
..
fc45635
100755
(executable)
--- a/
misc/regexfilter.pl
+++ b/
misc/regexfilter.pl
@@
-16,7
+16,7
@@
if (! -r $regexfile) {
exit 1;
}
exit 1;
}
-my $re = Regexp::Assemble->new(file => "$regexfile");
+my $re = Regexp::Assemble->new(file => "$regexfile", track => 1);
my $target = shift @ARGV;
my $target = shift @ARGV;
@@
-38,5
+38,9
@@
while ($line = <$input>) {
else {
print "NG: ";
}
else {
print "NG: ";
}
- print $line, "\n";
+ print $line;
+ if ($re->source) {
+ print " /", $re->source, "/";
+ }
+ print "\n";
}
}