Fix the regex t fix a bad match

This commit is contained in:
Rob Braden 2013-12-05 11:47:28 -08:00
parent 6870dfed7d
commit 76ad4c47fe

View file

@ -6,7 +6,7 @@ module Util
class IniFile
@@SECTION_REGEX = /^\s*\[([\w\d\.\\\/\-\:\s]*[\w\d\.\\\/\-])\]\s*$/
@@SETTING_REGEX = /^(\s*)([^\[#;]*[\w\d\.\\\/\-\s\[\]\']*[\w\d\.\\\/\-\]])([ \t]*=[ \t]*)([\S\s]*?)\s*$/
@@SETTING_REGEX = /^(\s*)([^\[#;][\w\d\.\\\/\-\s\[\]\']*[\w\d\.\\\/\-\]])([ \t]*=[ \t]*)([\S\s]*?)\s*$/
@@COMMENTED_SETTING_REGEX = /^(\s*)[#;]+(\s*)([^\[]*[\w\d\.\\\/\-]+[\w\d\.\\\/\-\[\]\']+)([ \t]*=[ \t]*)([\S\s]*?)\s*$/
def initialize(path, key_val_separator = ' = ')