Skip to content

Instantly share code, notes, and snippets.

@mattn
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/24712964da6e3112251c to your computer and use it in GitHub Desktop.
Save mattn/24712964da6e3112251c to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
my $pattern = shift or die "usage: $0 [pattern]";
while(my $line = <STDIN>){
chomp $line;
print $line, "\n" if $line =~ /$pattern/;
}
__END__
"CustomMatcher": {
"Perl/Regexp": [
"perl",
"/path/to/grep.pl",
"$QUERY"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment