update regexp example & test

This commit is contained in:
Pete Fritchman 2010-12-03 22:52:17 -05:00
parent 0b23d59e87
commit 70ebef9c83
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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