diff --git a/lib/cloud_formation_tool/cloud_formation.rb b/lib/cloud_formation_tool/cloud_formation.rb
index <HASH>..<HASH> 100644
--- a/lib/cloud_formation_tool/cloud_formation.rb
+++ b/lib/cloud_formation_tool/cloud_formation.rb
@@ -23,7 +23,7 @@ module CloudFormationTool
       begin
         text = File.read(@path)
         # remove comments because white space seen between comments can seriously psych Psych
-        text.gsub!(/^#.*\n/s,'')
+        text.gsub!(/^#.*\n/,'')
         text = fixShorthand(text)
         @data = YAML.load(text).to_h
       rescue Psych::SyntaxError => e
Fixed regex to not use perl flag /s because it doesn't mean it in ruby