Skip to content

Commit 0f79064

Browse files
wiibaaSuyog Rao
authored andcommitted
use non-capturing group in float regex
Closes #1253
1 parent 5194960 commit 0f79064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/logstash/filters/date.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def setupMatcher(field, locale, value)
134134
parser = lambda { |date| joda_parser.parseMillis(date) }
135135
when "UNIX" # unix epoch
136136
parser = lambda do |date|
137-
raise "Invalid UNIX epoch value '#{date}'" unless /^\d+(\.\d+)?$/ === date || date.is_a?(Numeric)
137+
raise "Invalid UNIX epoch value '#{date}'" unless /^\d+(?:\.\d+)?$/ === date || date.is_a?(Numeric)
138138
(date.to_f * 1000).to_i
139139
end
140140
when "UNIX_MS" # unix epoch in ms

0 commit comments

Comments
 (0)