mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
update regexp example & test
This commit is contained in:
parent
0b23d59e87
commit
70ebef9c83
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ filters:
|
|||
- nagios
|
||||
- test
|
||||
- match:
|
||||
message: r/foo.*bar/i
|
||||
message: (?i)foo.*bar
|
||||
program: test
|
||||
add_fields:
|
||||
nagios_alert: foo_alert
|
||||
|
|
|
@ -67,7 +67,7 @@ class TestFilterGrep < Test::Unit::TestCase
|
|||
|
||||
def test_single_match_regexp
|
||||
test_name "single_match_regexp"
|
||||
config [{"match" => {"str" => /test.*foo/i}}]
|
||||
config [{"match" => {"str" => "(?i)test.*foo"}}]
|
||||
|
||||
event = LogStash::Event.new
|
||||
event.type = @typename
|
||||
|
@ -78,7 +78,7 @@ class TestFilterGrep < Test::Unit::TestCase
|
|||
|
||||
def test_single_match_regexp_drop
|
||||
test_name "single_match_regexp_drop"
|
||||
config [{"match" => {"str" => /test.*foo/}}]
|
||||
config [{"match" => {"str" => "test.*foo"}}]
|
||||
|
||||
event = LogStash::Event.new
|
||||
event.type = @typename
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue