/usr/share/yapra/legacy_plugins/Filter/grep.rb is in yapra 0.1.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Filter input by given regular expression -- IKeJI
##
## Filter input by given regular expression.
## The test will be done with the result of to_s method of the input.
## invert option will invert results(-v option of UNIX grep command).
##
## - module: grep
## config:
## regex: "[あ-ん]"
## invert: false
def grep(config,data)
regex = Regexp.new(config["regex"])
invert = config["invert"] || false
data.select {|i| invert ^ (regex =~ i.to_s) }
end
|