diff --git a/lib/liquid/variable.rb b/lib/liquid/variable.rb
index <HASH>..<HASH> 100644
--- a/lib/liquid/variable.rb
+++ b/lib/liquid/variable.rb
@@ -18,14 +18,14 @@ module Liquid
       @markup  = markup
       @name    = nil
       @filters = []
-      if match = markup.match(/\s*(#{QuotedFragment})(.*)/)
+      if match = markup.match(/\s*(#{QuotedFragment})(.*)/o)
         @name = match[1]
-        if match[2].match(/#{FilterSeparator}\s*(.*)/)
+        if match[2].match(/#{FilterSeparator}\s*(.*)/o)
           filters = Regexp.last_match(1).scan(FilterParser)
           filters.each do |f|
             if matches = f.match(/\s*(\w+)/)
               filtername = matches[1]
-              filterargs = f.scan(/(?:#{FilterArgumentSeparator}|#{ArgumentSeparator})\s*(#{QuotedFragment})/).flatten
+              filterargs = f.scan(/(?:#{FilterArgumentSeparator}|#{ArgumentSeparator})\s*(#{QuotedFragment})/o).flatten
               @filters << [filtername.to_sym, filterargs]
             end
           end
apply "o" option to regexps to improve process time