diff --git a/lib/delocalize/parsers/date_time.rb b/lib/delocalize/parsers/date_time.rb index 40662f3..3648f03 100644 --- a/lib/delocalize/parsers/date_time.rb +++ b/lib/delocalize/parsers/date_time.rb @@ -82,7 +82,7 @@ def input_formats(type) end def apply_regex(format) - format.gsub(/(#{REGEXPS.keys.join('|')})/) { |s| REGEXPS[$1] } + Regexp.escape(format).gsub(/(#{REGEXPS.keys.join('|')})/) { |s| REGEXPS[$1] } end end end