33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/fluent/plugin/parser_regexp.rb', line 33
def configure(conf)
super
if @ignorecase || @multiline
options = 0
options |= Regexp::IGNORECASE if @ignorecase
options |= Regexp::MULTILINE if @multiline
@expression = Regexp.compile(@expression.source, options)
end
@regexp = @expression
if @expression.named_captures.empty?
raise Fluent::ConfigError, "No named captures in 'expression' parameter. The regexp must have at least one named capture"
end
end
|