logstash/logstash — pull request #441 by rarruda (2013-04-16 14:19:00+00:00)
Title: Fix grok pattern: Disable dashes after the last period in a domain name.

Hi,

Hopefully this regex is a little better then the previous one, without breaking anything from before. From all my tests it seems to be the case.

The usecase that I needed to solve was to correct pick up the hostname from within a string which contains a dash after the last period ( \. ) :

www.example.com-sample is not a valid hostname, and should be matched as www.example.com and not as www.example.com-sample

However www-2.example-dot-com.com is a valid hostname, and it should still be matched. (And still is according to my tests).

I've left a comment in the grok patterns file, and feel free to remove it.

Let me know if there is anything else i should do to get the changes integrated upstream, or what's the "right" way to submit the change.

Regards,
rarruda